Builds a Vector3 from three components, from one number for all three, from an array of three floats, or from a Vector2 and a z.
assert(xyz(1, 2, 3) == Vector3.{ 1, 2, 3 } && xyz(4) == xyz(4, 4, 4));
assert(xyz(xy(1, 2), 3) == xyz(1, 2, 3));xyz :: (x: float, y: float, z: float) -> Vector3
Short form of Vector3.{ x, y, z }.
Parameters
- x: float
- the x component.
- y: float
- the y component.
- z: float
- the z component.
Returns
xyz :: (x: float) -> Vector3
A vector with all three components set to x.
Parameters
- x: float
- the value for each component.
Returns
xyz :: (c: [3] float) -> Vector3
A vector from an array of x, y, z.
Parameters
- c: [3] float
- the three components, in x, y, z order.
Returns
xyz :: (v: Vector2, z: float) -> Vector3
Extends a Vector2 with a z component.
Parameters
- v: Vector2
- supplies x and y.
- z: float
- the z component.