class Vector2
implements Point2
import { Vector2 } from "https://deno.land/x/gmath@0.1.12/src/vector2.ts";
Methods
Returns a new Vector2 with the same direction, but clamped to the specified length
isFinite(): boolean
Checks if the Vector2 is finite
Linearly interpolates between this and the specified Vector2
mag(): number
The magnitude of this Vector2
mag2(): number
The squared magnitude of this Vector2
Sets the x and y of this Vector2 to the specified Vector2 x and y values
toArray(): [number, number]
Converts the Vector2 to a tuple of numbers
toFloat32Array(): Float32Array
Converts the Vector to a Float32Array
toString(): string
Converts the Vector2 to a string
Static Methods
A Vector2 with all values set to Number.NEGATIVE_INFINITY
A Vector2 with all values set to Number.POSITIVE_INFINITY