w component.
x component.
y component.
z component.
Adds the current vector with another one and return this
specified vector
Adds the current vector with another one and return this
The x value of specified vector
The y value of specified vector
The z value of specified vector
The w value of specified vector
clone the current Vec4 value.
Calculates the cross product with another vector.
Element-wisely divides this vector with another one, and return this.
specified vector
Element-wisely divides this vector with another one, and return this.
The x value of specified vector
The y value of specified vector
The z value of specified vector
The w value of specified vector
Calculates the dot product with another vector
当前向量与指定向量点乘的结果。
Check whether the vector approximately equals another one.
Specified vector
The error allowed. It`s should be a non-negative number.
Returns true
when the components of both vectors are equal within the specified range of error; otherwise it returns false
.
Check whether the vector approximately equals another one.
The x value of specified vector
The y value of specified vector
The z value of specified vector
The w value of specified vector
The error allowed. It`s should be a non-negative number.
Returns true
when the components of both vectors are equal within the specified range of error; otherwise it returns false
.
Returns the length of this vector.
Length of vector
Returns the squared length of this vector.
the squared length of this vector
Calculate linear interpolation result between this vector and another one with given ratio.
Target vector
The interpolation coefficient.The range is [0,1].
Multiplies the current vector with another one and return this
specified vector
Multiplies the current vector with another one and return this
The x value of specified vector
The y value of specified vector
The z value of specified vector
The w value of specified vector
Multiplies the current vector with a number, and returns this.
scalar number
Sets each component of this vector with its negative value
Normalize the current vector.
Set the current vector value with the given vector.
Specified vector
this
Set the value of each component of the current vector.
x value
y value
z value
w value
this
Check whether the current vector strictly equals another Vec4.
specified vector
Returns true
when the components of both vectors are equal within the specified range of error; otherwise it returns false
.
Check whether the current vector strictly equals another Vec4.
The x value of specified vector
The y value of specified vector
The z value of specified vector
The w value of specified vector
Returns true
when the components of both vectors are equal within the specified range of error; otherwise it returns false
.
Subtracts one vector from this, and returns this.
specified vector
Subtracts one vector from this, and returns this.
The x value of specified vector
The y value of specified vector
The z value of specified vector
The w value of specified vector
Return the information of the vector in string
The string with vector information
Transforms the vec4 with a mat4
matrix to transform with
Element-wise vector addition and save the results to out vector object
Rounds up by elements of the vector and save the results to out vector object
Copy the target vector and save the results to out vector object
Calculates the euclidean distance of two vectors
Element-wise vector division and save the results to out vector object
Calculates the dot product of the vector
Check whether the two given vectors are approximately equivalent
Element-wise rounds down of the current vector and save the results to the out vector
Converts the given array to a vector
Array Start Offset
Sets each element to its inverse value, zero value will become Infinity
Sets each element to its inverse value, zero value will remain zero
Calculates the length of the vector
Calculates the squared length of the vector
Calculates the linear interpolation between two vectors with a given ratio
Calculates the maximum values by elements of the vector and save the results to the out vector
Calculates the minimum values by elements of the vector and save the results to the out vector
Element-wise vector multiplication and save the results to out vector object
Vector scalar multiplication and save the results to out vector object
Sets each element to its negative value
Sets the normalized vector to the out vector
Generates a uniformly distributed random vector points from center to the surface of the unit sphere
vector length
Calculates element-wise round results and save to the out vector
Element-wise multiplication and addition with the equation: a + b * scale
Sets the out vector with the given x, y, z and w values
Calculates the squared euclidean distance of two vectors
Check the equality of the two given vectors
Element-wise vector subtraction and save the results to out vector object
Converts the given vector to an array
Array Start Offset
Generated using TypeDoc
Representation of four-dimensional vectors.