Vec2
-
class
cee.Vec2() An immutable 2d vector with x, y values.
Used e.g. for texture coordinates
Constructors
Methods
Constructors
-
Vec2.constructor(x, y) Arguments: - x (
number) – None - y (
number) – None
Constructor
Return type: Vec2 - x (
Properties
-
Vec2.x Type: number The x coordinate of the vector
-
Vec2.y Type: number The y coordinate of the vector
Methods
equals
getLengthSquared
-
Vec2.getLengthSquared() Returns the squared length of the vector
Return type: number
static add
static dot
static from
static fromArray
-
Vec2.fromArray(arr) Arguments: - arr (
ArrayLike) – None
Creates a new Vec2 instance from the first 2 elements of the given array.
Return type: Vec2 - arr (