/** * Class representing a four-dimensional Vector with properties x, y, z and w and providing static utilities for mathematical operations */ export declare class Vec4 { readonly x: number; readonly y: number; readonly z: number; readonly w: number; /** * Add two Vec4s * * @param left the first vec4 * @param right the second Vec4 * * @returns the result of the addition */ static add(left: Vec4, right: Vec4): Vec4; /** * Subtract the right Vec4 from the left * * @param left the Vec4 to subtract from * @param right the Vec4 to subtract * * @returns the result of the subtraction */ static sub(left: Vec4, right: Vec4): Vec4; /** * Multiply two Vec4s * * @param left the first Vec4 * @param right the second Vec4 * * @returns the result of the multiplication */ static mult(left: Vec4, right: Vec4): Vec4; /** * Divide the left Vec4 by the right * * @param left the Vec4 to divide * @param right the Vec4 to divide by * * @returns the result of the division */ static div(left: Vec4, right: Vec4): Vec4; /** * Scale a Vec4 by a given factor * * @param v the Vec4 to scale * @param factor the factor to scale by * * @returns the scalec Vec4 */ static scale(v: Vec4, factor: number): Vec4; /** * Negate a Vec4 * * @param v the Vec4 to negate * * @returns the negated Vec4 */ static negate(v: Vec4): Vec4; /** * Invert a Vec4 * * @param v the Vec4 to invert * * @returns the inverse of the Vec4 */ static invert(v: Vec4): Vec4; /** * Normalize a Vec4 * * @param v the Vec4 to normalize * * @returns the normalized Vec4 */ static normalize(v: Vec4): Vec4; /** * Calculate the dot product of two Vec4s * * @param left the first Vec4 * @param right the second Vec4 * * @returns the dot product of the two Vec4s */ static dot(left: Vec4, right: Vec4): number; /** * Calculate the distance between two Vec4s * * @param left the first Vec4 * @param right the second Vec4 * * @returns the distance between the two Vec4s */ static distanceBetween(left: Vec4, right: Vec4): number; /** * Constructor. Take and store the Vec4's x, y, z and w properties * * @param x the Vec4's x; defaults to 0 * @param y the Vec4's y; defaults to 0 * @param z the Vec4's z; defaults to 0 * @param w the Vec4's w; defaults to 0 */ constructor(x?: number, y?: number, z?: number, w?: number); /** * Getter for the Vec4's magnitude */ get magnitude(): number; /** * Getter for the Array form of the Vec4 */ get array(): Array; /** * Getter for the Float32Array form of the Vec4 */ get float32Array(): Float32Array; /** * Getter for the readable string form of the Vec4 */ get string(): string; /** * Set the Vec4's x, y, z and w to the given values * * @param x the new x; defaults to 0 * @param y the new y; defaults to 0 * @param z the new z; defaults to 0 * @param w the new w; defaults to 0 */ set(x?: number, y?: number, z?: number, w?: number): void; /** * Set the Vec4's x to the given value * * @param x the new x; defaults to 0 */ setX(x?: number): void; /** * Set the Vec4's y to the given value * * @param y the new y; defaults to 0 */ setY(y?: number): void; /** * Set the Vec4's z to the given value * * @param z the new z; defaults to 0 */ setZ(z?: number): void; /** * Set the Vec4's w to the given value * * @param w the new w; defaults to 0 */ setW(w?: number): void; /** * Clone the Vec4 * * @returns a new Vec4 with the same x, y, z and w as this one */ clone(): Vec4; /** * Getter for a Mutable cast of the Vec4 instance; used for enabling internal-only mutation in the set*() methods * * @returns the typecasted Mutable Vec4 instance */ private get mutable(); }