Creates a new vec4 initialized with values from an existing vector
vector to clone
a new 4D vector
Creates a new, empty vec4
a new 4D vector
Returns the cross-product of three vectors in a 4-dimensional space
result
Calculates the euclidian distance between two vec4's
the first operand
the second operand
distance between a and b
Calculates the euclidian distance between two vec4's
the first operand
the second operand
distance between a and b
Calculates the dot product of two vec4's
the first operand
the second operand
dot product of a and b
Returns whether or not the vectors have approximately the same elements in the same position.
The first vector.
The second vector.
True if the vectors are equal, false otherwise.
Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)
The first vector.
The second vector.
True if the vectors are equal, false otherwise.
Creates a new vec4 initialized with the given values
X component
Y component
Z component
W component
a new 4D vector
Calculates the length of a vec4
vector to calculate length of
length of a
Calculates the length of a vec4
vector to calculate length of
length of a
Calculates the squared euclidian distance between two vec4's
the first operand
the second operand
squared distance between a and b
Calculates the squared length of a vec4
vector to calculate squared length of
squared length of a
Calculates the squared euclidian distance between two vec4's
the first operand
the second operand
squared distance between a and b
Calculates the squared length of a vec4
vector to calculate squared length of
squared length of a
Returns a string representation of a vector
vector to represent as a string
string representation of the vector
Adds two vec4's