The underlying typed array containing vector components (mutable)
ReadonlybytesNumber of bytes per component in the underlying array
ReadonlyclassThe class name identifier
ReadonlyglslGLSL string representation for float type
ReadonlyglslGLSL string representation for integer type
ReadonlyglslGLSL string representation for unsigned integer type
ReadonlywgslWGSL string representation for float type
ReadonlywgslWGSL string representation for integer type
ReadonlywgslWGSL string representation for unsigned integer type
ReadonlyxThe scalar value (x component)
Adds another vector to this vector.
The vector to add
This vector for method chaining
Gets the component value at the specified index.
The component index
The component value
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
Converts the vector to a flat array of numbers.
Array containing all vector components
Checks if this is a dummy/placeholder vector.
True if this is a dummy vector
Checks if this vector is equal to another vector within a tolerance.
The vector to compare with
Optionaldelta: 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
Checks if this vector shares the same source array buffer.
The array buffer to check
True if using the same source buffer
Calculates the length (magnitude) of the vector.
The vector length
Calculates the squared length of the vector (faster than length).
The squared vector length
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
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.
The component values
This vector for method chaining
Subtracts another vector from this vector.
The vector to subtract
This vector for method chaining
Returns a string representation of the vector.
String representation of the vector
Returns an approximate string representation of the vector with rounded values.
Approximate string representation
Gets the component value at the specified index (alias for at).
The component index
The component value
Interface for mutable scalar values.