Readonly_The underlying typed array containing vector components
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
ReadonlywThe w component
ReadonlywgslWGSL string representation for float type
ReadonlywgslWGSL string representation for integer type
ReadonlywgslWGSL string representation for unsigned integer type
ReadonlyxThe x component
ReadonlyyThe y component
ReadonlyzThe z component
Gets component at index.
Component index (0=x, 1=y, 2=z, 3=w)
Component value
Calculates dot product with another Vector4.
Other vector
Dot product
Converts the vector to a flat array.
Array containing [x, y, z, w]
Checks if this is a dummy vector.
True if dummy
Checks equality with another Vector4 within tolerance.
Vector to compare with
Optionaldelta: numberOptional tolerance
True if approximately equal
Checks strict equality with another Vector4.
Vector to compare with
True if 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 vector length.
Vector magnitude
Calculates squared length.
Squared magnitude
Returns a string representation of the vector.
String representation
Returns an approximate string representation 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 immutable 4D vectors. Provides operations specific to 4-component vectors (homogeneous coordinates).