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
clone a Vec3 value
Calculates the cross product with another vector.
specified 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
Calculates the dot product with another vector
specified vector
The result of 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 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
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
this
Check whether the current vector strictly equals another Vec3.
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 Vec3.
The x value of specified vector
The y value of specified vector
The z 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
Transform to string with vector information.
The string with vector information
Transforms the vec3 with a mat4. 4th vector component is implicitly '1'
matrix to transform with
Converts the given array to a vector
Array Start Offset
Calculates the length of the vector
Calculates the squared length of the vector
Generates a uniformly distributed random vector points from center to the surface of the unit sphere
vector length
Sets the out vector with the given x, y and z values
Converts the given vector to an array
Array Start Offset
return a Vec3 object with x = 0, y = 0, z = 0.
Generated using TypeDoc
Representation of 3D vectors and points.