We use cookies on this site to enhance your user experience
Collapse Sidebar



Constructors ( number x, number y )

Creates a new Vector2 using ordinates x and y


number Vector2.X

The x-coordinate

number Vector2.Y

The y-coordinate

number Vector2.Magnitude

The length of the vector

Vector2 Vector2.Unit

A normalized copy of the vector


Vector2 Vector2:Lerp ( Vector2 v, number alpha )

Returns a Vector2 linearly interpolated between this Vector2 and v by the fraction alpha

number Vector2:Dot ( Vector2 v )

Returns a scalar dot product of the two vectors

number Vector2:Cross ( Vector2 other )

Returns the cross product of the two vectors