/** * A vector with 4 components, labeled: `X`, `Y`, `Z`, `W`. */ export declare class Vector4 { /** * The components of the vector. */ k: number[]; /** * Get the X component of the vector. * @returns The X component of the vector. */ get x(): number; /** * Set the X component of the vector. */ set x(value: number); /** * Get the Y component of the vector. * @returns The Y component of the vector. */ get y(): number; /** * Set the Y component of the vector. */ set y(value: number); /** * Get the Z component of the vector. * @returns The Z component of the vector. */ get z(): number; /** * Set the Z component of the vector. */ set z(value: number); /** * Get the W component of the vector. * @returns The W component of the vector. */ get w(): number; /** * Set the W component of the vector. */ set w(value: number); /** * Constructs a new {@linkcode Vector4}. * @param x - The X component. * @param y - The Y component. * @param z - The Z component. * @param w - The W component. */ constructor(x: number, y: number, z: number, w: number); /** * Creates a copy of another {@linkcode Vector4}. * @param vector - The vector to copy. * @returns A new vector. */ static fromVector4(vector: Readonly): Vector4; /** * Sets the vector to new coordinates. * @param vector - The coordinates to set the vector to. * @returns This instance. */ set(vector: Readonly): this; /** * Sets the vector to new coordinates. * @param x - The new X component for the vector. * @param y - The new Y component for the vector. * @param z - The new Z component for the vector. * @param w - The new W component for the vector. * @returns This instance. */ setXYZW(x: number, y: number, z: number, w: number): this; /** * Adds the XYZ components of another vector to this vector. * @param vector - The vector to add to this vector. * @returns This instance. */ add3(vector: Readonly): this; /** * Adds the XYZ components of another vector to this vector. * @param x - The value to add to the X component. * @param y - The value to add to the Y component. * @param z - The value to add to the Z component. * @returns This instance. */ add3XYZ(x: number, y: number, z: number): this; /** * Scales another vector and adds its XYZ components to this vector. * @param vector - The vector to add to this vector. * @param scale - The scaling to apply to the input vector. * @returns This instance. */ addMultiply3(vector: Readonly, scale: number): this; /** * Scales another vector and adds its XYZ components to this vector. * @param x - The value to add to the X component. * @param y - The value to add to the Y component. * @param z - The value to add to the Z component. * @param scale - The scaling to apply to the input vector. * @returns This instance. */ addMultiply3XYZ(x: number, y: number, z: number, scale: number): this; /** * Subtracts the XYZ components of another vector from this vector. * @param vector - The vector to subtract from this vector. * @returns This instance. */ subtract3(vector: Readonly): this; /** * Subtracts the XYZ components of another vector from this vector. * @param x - The value to subtract from the X component. * @param y - The value to subtract from the Y component. * @param z - The value to subtract from the Z component. * @returns This instance. */ subtract3XYZ(x: number, y: number, z: number): this; /** * Multiplies the XYZ components of this vector by another vector. * @param vector - The vector to multiply with this vector. * @returns This instance. */ multiply3(vector: Readonly): this; /** * Multiplies the XYZ components of this vector by another vector. * @param x - The value to multiply with the X component. * @param y - The value to multiply with the Y component. * @param z - The value to multiply with the Z component. * @returns This instance. */ multiply3XYZ(x: number, y: number, z: number): this; /** * Multiplies the XYZ components of the vector by the given scale. * @param scale - The scaling to apply to the vector. * @returns This instance. */ multiply3Scale(scale: number): this; /** * Divides the XYZ components of this vector by another vector. * @param vector - The vector to divide this vector with. * @returns This instance. */ divide3(vector: Readonly): this; /** * Divides the XYZ components of this vector by another vector. * @param x - The value to divide the X component with. * @param y - The value to divide the Y component with. * @param z - The value to divide the Z component with. * @returns This instance. */ divide3XYZ(x: number, y: number, z: number): this; /** * Divides the XYZ components of the vector by the given scale. * @param scale - The scaling to apply to the vector. * @returns This instance. */ divide3Scale(scale: number): this; /** * Inverts the direction of the vector. * @returns This instance. */ invertAdd3(): this; /** * Inverts the vectors scale. * @returns This instance. */ invertMultiply3(): this; /** * Clamps the components of the vector at the given boundary. * @param floor - The lowest value to allow. * @param ceil - The largest value to allow. * @returns This instance. */ clamp(floor: number, ceil: number): this; /** * Linearly moves this vector towards a target vector. * @param vector - The target vector. * @param t - The location on the scale, from `0` to `1`. * @returns This instance. */ lerp(vector: Readonly, t: number): this; }