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

Vector2

Vector2

Constructors

Vector2.new ( number x, number y )

Creates a new Vector2 using ordinates x and y

Properties

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

Functions

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

Vector2 Vector2:Cross ( Vector2 other )

Returns the cross product of the two vectors