Math module

rgb

procedure · 4 overloadsSource

The same procedure as xyz, named for colors: red, green and blue as a Vector3.

rgb :: (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

rgb :: (x: float) -> Vector3

A vector with all three components set to x.

Parameters

x: float
the value for each component.

Returns

rgb :: (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

rgb :: (v: Vector2, z: float) -> Vector3

Extends a Vector2 with a z component.

Parameters

v: Vector2
supplies x and y.
z: float
the z component.

Returns

See also