Rengy Script · Type
Vec2
Two numbers, x and y: a position, a direction or a size. Build one with vec2(x, y).
Members
.x -> f32
The x component.
.y -> f32
The y component.
Methods
.length() -> f32
How long this vector is.
.distance(other: Vec2) -> f32
How far apart two points are.
.normalized() -> Vec2
The same direction at length one; a zero vector stays zero.