The x component of the vector. Default is 0.
The y component of the vector. Default is 0.
The z component of the vector. Default is 0.
The x component of the vector.
The y component of the vector.
The z component of the vector.
Adds the scalar value s to the x, y and z components of this vector.
The scalar value to add.
Returns the angle between this vector and vector v in radians.
The second vector to calculate the angle to (the first one being this vector).
Applies the quaternion transform q to this vector.
Rounds this vector's components up to the nearest integer value.
If this vector's x, y or z value is greater than the max vector's x, y or z value, it is replaced by the corresponding value. If this vector's x, y or z value is less than the min vector's x, y or z value, it is replaced by the corresponding value.
The vector with the minimum x, y and z values used for clamping this vector.
The vector with the maximum x, y and z values used for clamping this vector.
If this vector's length is greater than the max value, the vector will be scaled down so its length is the max value. If this vector's length is less than the min value, the vector will be scaled up so its length is the min value.
The minimum value the length will be clamped to.
The maximum value the length will be clamped to.
If this vector's x, y or z values are greater than the max value, they are replaced by the maxVal value. If this vector's x, y or z values are less than the min value, they are replaced by the minVal value.
The minimum value used for clamping this vector.
The maximum value used for clamping this vector.
Returns a new vector with the same x, y and z values as this one.
Sets this vector to the cross product of itself and v.
The second vector to calculate the cross product from (the first one being this vector).
Sets this vector to the cross product of a and b.
The first vector to calculate the cross product from.
The second vector to calculate the cross product from.
Calculates the distance from this vector to v.
The second vector to calculate the distance to (the first one being this vector).
Calculates the squared distance from this vector to v. If you are just comparing the distance with another distance, you should compare the distance squared instead as it is slightly more efficient to calculate.
The second to calculate the squared distance to (the first one being this vector).
Divides this vector by the scalar s. Each component of this vector is divided by the same value s. Set this vector to (0, 0, 0) if s == 0.
The value to divide each component of this vector with.
Calculates the dot product of this vector and v.
The other vector to calculate the dot product with.
Checks for strict equality of this vector and v.
The other vector to compare this one to.
Rounds this vector's components down to the nearest integer value.
Sets this vector's x value to be array[offset+0], y value to be array[offset+1] and z value to be array[offset+2].
The array of format [x, y, z] used to construct this vector.
An offset into the array from where to start reading the components.
Gets the value of the index-th component of the vector. Index 0 corresponds to the x component, 1 is y and 2 is z.
The index (0, 1 or 2) of the component to get.
Computes the Euclidean length (straight-line length) from (0, 0, 0) to this vector's (x, y, z). If you are comparing the lengths of vectors, you should compare the length squared instead as it is slightly more efficient to calculate.
Computes the Manhattan length of this vector.
Computes the square of the Euclidean length (straight-line length) from (0, 0, 0) to this vector's (x, y, z). If you are comparing the lengths of vectors, you should compare the length squared instead as it is slightly more efficient to calculate.
Linearly interpolates between this vector and v by alpha amount (alpha=0 returns this vector, while alpha=1 returns v) and stores the result into this vector.
The vector to interpolate this one towards.
The interpolation factor, typically in the closed interval [0, 1].
Linearly interpolates between v1 and v2 by alpha amount (alpha=0 returns v1, while alpha=1 returns v2) and stores the result into this vector.
The starting vector (returned when alpha equals 0).
The vector to interpolate towards (returned when alpha equals 1).
The interpolation factor, typically in the closed interval [0, 1].
Multiplies this vector by the scalar s. Each component of this vector is multiplied by the same value s.
The value to multiply each component of this vector by.
Inverts this vector, i.e. sets x=-x, y=-y and z=-z.
Converts this vector to a unit vector, that is, sets it equal to a vector with the same direction as this one, but with a length of 1.
Rounds this vector's components to the nearest integer value.
Rounds this vector's components towards zero (up if negative, down if positive) to an integer value.
Sets the x, y, z components of this vector to the provided ones.
The x component of the vector.
The y component of the vector.
The z component of the vector.
Sets the index-th component of this vector to the provided value. Index 0 corresponds to the x component, 1 is y and 2 is z.
The index (0, 1 or 2) of the component to set.
The value to set the component of this vector to.
Sets this vector to the position elements of the transformation matrix m.
The transformation matrix which position elements are used to set this vector.
Sets this vector to the scale part of the transformation matrix m.
The transformation matrix which scale is used to set this vector.
Set this vector to a vector with the same direction as this one, but a length of l.
The length to set this vector to.
Sets the x, y, z components of this vector to the same scalar value.
The value to set all the components of this vector to.
Sets this vector's x component to the provided value.
The value to set the x component to.
Sets this vector's y component to the provided value.
The value to set the y component to.
Sets this vector's z component to the provided value.
The value to set the z component to.
Subtracts the scalar s from this vector's x, y and z components.
The value to subtract to the x, y and z components of this vector.
Returns the components of this vector in an array of format [x, y, z].
The array to store the compoments of the vector in. If not specified, a new array will be created.
An offset into the array where to write the elements of this vector.
Creates a new Vector3