> For the complete documentation index, see [llms.txt](https://docs.anvil.team/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.anvil.team/types/vec4.md).

# Vec4

A four dimensional vector

### Properties <a href="#properties" id="properties"></a>

* <mark style="color:purple;">`x`</mark> - double
* <mark style="color:purple;">`y`</mark> - double
* <mark style="color:purple;">`z`</mark> - double
* <mark style="color:purple;">`w`</mark> - double

### <mark style="color:green;">`Vec4:new(x, y, z, w)`</mark>

* <mark style="color:purple;">`x`</mark> - What to set x to
* <mark style="color:purple;">`y`</mark> - What to set y to&#x20;
* <mark style="color:purple;">`z`</mark> - What to set z to&#x20;
* <mark style="color:purple;">`w`</mark> - What to set w to (This is usually the alpha value of a color)&#x20;

Constructs a new Vec4 with the provided x, y, z and w.

**Example:**

```lua
local red = Vec4:new(255, 0, 0, 255)
```
