Alternate name for the w component.
Alternate name for the z component.
Alternate name for the y component.
Returns the length of the vector.
Returns the squared length of the vector.
Alternate name for the x component.
w component of the vec4.
x component of the vec4.
y component of the vec4.
z component of the vec4.
Returns the angle between the vector and vec
.
Returns the distance between the vector and the vector vec
.
Like distance()
, but returns the squared distance between vectors.
Returns the dot product of the vector and vec
.
Returns whether this is equal to vec
.
A four dimensional vector. Vectors can only store finite numbers in the range Number.MIN_VALUE to Number.MAX_VALUE.
Example