Optional
arg: neverOptional
Optional
arg2: neverOptional
X component of this vector.
Y component of this vector.
Z component of this vector.
add
Adds the vector v to this, returning itself.
Assigns the values of the passed in vector to this vector. Returns itself.
clamp
Clamps the components of a vector to limits to produce a new vector
cross
Computes the cross product of this and the passed in vector, returning itself.
distance
Calculate the distance between two vectors
dot
Computes the dot product of this and the passed in vector.
equals
Check the equality of two vectors
floor
Floor the components of a vector to produce a new vector
lerp
Constructs a new vector using linear interpolation on each component from two vectors.
normalize
Normalizes this vector, returning itself.
scale
Scales this by the passed in value, returning itself.
slerp
Constructs a new vector using spherical linear interpolation on each component from two vectors.
subtract
Subtracts the vector v from this, returning itself.
Vector3 wrapper class which can be used as a Vector3 for APIs on @minecraft/server which require a Vector, but also contain additional helper methods. This is an alternative to using the core Vector 3 utility methods directly, for those who prefer a more object-oriented approach. This version of the class is mutable and changes state inline.
For an immutable version of the build, use ImmutableVector3Builder.