heyplay Welcome Play Create Explore Log in Log in

Editor documentation

Top Heyplay IOkit Vector

Represents 2D vector with direction & magniture or a point in 2D space.

Properties
x
X coordinate - a value on horizontal axis, increasing to the right.
y
Y coordinate - a value on vertical axis, increasing to the bottom.
dir
Vector direction in radians.
mag
Vector magnitude (its length or in case of point - a distance from (0,0)).
Methods
clone
equals
add
subtract
multiply
min
max
mix
distance
constructor Constructor