class Vector2 implements Point2Re-exportimport { Vector2 } from "https://deno.land/x/gmath@0.1.12/mod.ts"; ConstructorsnewVector2()newVector2(x: number)newVector2(x: number, y: number)newVector2(source: Float32Array)newVector2(x?: number | Float32Array, y?: number)Propertiesx: numbery: number[0]: number[1]: numberMethodsadd(other: number | Vector2): Vector2Adds this Vector2 to the specified Vector2 or scalar angle(): RadReturns the angle of this Vector2 clamp(length: number): Vector2Returns a new Vector2 with the same direction, but clamped to the specified length clone(): Vector2Creates a new Vector2 with the same values div(other: number | Vector2): Vector2Divides this Vector2 with the specified Vector2 or scalar dot(other: Vector2): numberCalculates the dot product of this Vector2 eq(other: Vector2): booleanChecks equality between two Vector2 extend3(z: number): Vector3Create a Vector3 using this x and y and the provided z extend4(z: number, w: number): Vector4Create a Vector4 using this x and y and the provided z and w isFinite(): booleanChecks if the Vector2 is finite lerp(other: Vector2, alpha: number): Vector2Linearly interpolates between this and the specified Vector2 mag(): numberThe magnitude of this Vector2 mag2(): numberThe squared magnitude of this Vector2 midpoint(other: Vector2): Vector2Calculates the midpoint between two Vector2 mul(other: number | Vector2): Vector2Multiplies this Vector2 with the specified Vector2 or scalar neg(): Vector2Negates the values of this Vector2 normal(): Vector2Returns a new Vector2 with the same direction, but with a magnitude of 1 set(other: Vector2): Vector2Sets the x and y of this Vector2 to the specified Vector2 x and y values sub(other: number | Vector2): Vector2Subtracts this Vector2 from the specified Vector2 or scalar toArray(): [number, number]Converts the Vector2 to a tuple of numbers toFloat32Array(): Float32ArrayConverts the Vector to a Float32Array toString(): stringConverts the Vector2 to a string Static Methodsdown(): Vector2Shorthand for writing Vector2(0, -1) left(): Vector2Shorthand for writing Vector2(-1, 0) negativeInfinity(): Vector2A Vector2 with all values set to Number.NEGATIVE_INFINITY one(): Vector2A Vector2 with all values set to 1 positiveInfinity(): Vector2A Vector2 with all values set to Number.POSITIVE_INFINITY right(): Vector2Shorthand for writing Vector2(1, 0) up(): Vector2Shorthand for writing Vector2(0, 1) zero(): Vector2A Vector2 with all values set to 0