Constructor
The x coordinate of the vector
The y coordinate of the vector
Returns true if the vectors are equal
Returns the length of the vector (sqrt(x^2 + y^2)).
Returns the squared length of the vector
Returns a negated version of the vector.
Returns a normalized version of the vector.
Creates a new Vec2 instance from the first 2 elements of the given array.
Generated using TypeDoc
An immutable 2d vector with x, y values.
Used e.g. for texture coordinates