Builds a Vector4 from four components, from one number for all four, from a Vector3 and a w, or from a Vector2 plus z and w.
assert(xyzw(1, 2, 3, 4) == Vector4.{ 1, 2, 3, 4 });
assert(xyzw(xy(1, 2), 3, 4) == xyzw(1, 2, 3, 4));xyzw :: (x: float, y: float, z: float, w: float) -> Vector4
Short form of Vector4.{ x, y, z, w }.
Parameters
- x: float
- the x component.
- y: float
- the y component.
- z: float
- the z component.
- w: float
- the w component.
Returns
xyzw :: (x: float) -> Vector4
A vector with all four components set to x.
Parameters
- x: float
- the value for each component.
Returns
xyzw :: (v: Vector2, z: float, w: float) -> Vector4
Extends a Vector2 with z and w components.
Parameters
- v: Vector2
- supplies x and y.
- z: float
- the z component.
- w: float
- the w component.
Returns
xyzw :: (v: Vector3, w: float) -> Vector4
Extends a Vector3 with a w component.
Parameters
- v: Vector3
- supplies x, y and z.
- w: float
- the w component.