The underlying typed array containing vector components (mutable)
Readonly
bytesNumber of bytes per component in the underlying array
Readonly
classThe class name identifier
Readonly
glslGLSL string representation for float type
Readonly
glslGLSL string representation for integer type
Readonly
wgslWGSL string representation for float type
Readonly
wgslWGSL string representation for integer type
Readonly
xThe scalar value (x component)
Adds another vector to this vector.
The vector to add
This vector for method chaining
Copies components from another vector.
The source vector
This vector for method chaining
Divides this vector by a scalar value.
The scalar divisor
This vector for method chaining
Divides this vector component-wise by another vector.
The vector to divide by
This vector for method chaining
Calculates the dot product with another vector.
The other vector
The dot product result
Checks if this vector is equal to another vector within a tolerance.
The vector to compare with
Optional
delta: numberOptional tolerance value (default: small epsilon)
True if vectors are approximately equal
Checks if this vector is strictly equal to another vector.
The vector to compare with
True if vectors are exactly equal
Calculates the distance to another vector.
The target vector
The distance between vectors
Multiplies this vector by a scalar value.
The scalar multiplier
This vector for method chaining
Multiplies this vector component-wise by another vector.
The vector to multiply by
This vector for method chaining
Normalizes the vector to unit length.
This vector for method chaining
Sets all components to one.
This vector for method chaining
Gets the raw underlying typed array.
The raw typed array
Sets the component value at the specified index.
The component index
The new value
This vector for method chaining
Sets all components of the vector.
Rest
...num: number[]The component values
This vector for method chaining
Subtracts another vector from this vector.
The vector to subtract
This vector for method chaining
Sets all components to zero.
This vector for method chaining
Interface for mutable scalar values.