The Vector2
class can be used for calculating math with
basic (x, y) coordinates
Static methods
Constructor
Variables
read onlylengthSquared:Float
Gets the square of the length of this vector, which
avoids use of Math.sqrt
for faster performance
Methods
normalize(thickness:Float):Void
Normalizes this vector between the current length and a set scale value
Parameters:
thickness | The scaling value. . For example, if the current vector is |
---|
offset(dx:Float, dy:Float):Void
Offsets the current value of this vector
Parameters:
dx | An offset x value |
---|---|
dy | An offset y value |