Math module

make_vector2

procedure · 1 overloadSource

A Vector2 with both components set to x. To build one from two numbers, write xy(x, y) or Vector2.{ x, y }.

ExampleOpen in playground ↗
assert(make_vector2(2) == xy(2, 2));
make_vector2 :: (x: float) -> Vector2

A vector with both components set to x.

Parameters

x: float
the value for each component.

Returns

See also