Staticaddadd
Add two vectors to produce a new vector
Staticclampclamp
Clamps the components of a vector to limits to produce a new vector
Optionallimits: { max?: Partial<VectorXZ>; min?: Partial<VectorXZ> }Staticdistancedistance
Calculate the distance between two vectors
Staticdotdot
Calculate the dot product of two vectors
Staticequalsequals
Check the equality of two vectors
Staticfloorfloor
Floor the components of a vector to produce a new vector
StaticfromfromString
Gets a VectorXZ from the string representation produced by VectorXZUtils.toString. If any numeric value is not a number or the format is invalid, undefined is returned.
The string to parse
Optionaldelimiter: stringThe delimiter used to separate the components. Defaults to the same as the default for VectorXZUtils.toString
Staticlerplerp
Constructs a new vector using linear interpolation on each component from two vectors.
Staticmagnitudemagnitude
The magnitude of a vector
Staticmultiplymultiply
Element-wise multiplication of two vectors together. Not to be confused with VectorXZUtils.dot product
Staticnormalizenormalize
Takes a vector 3 and normalizes it to a unit vector
Staticscalescale
Multiple all entries in a vector by a single scalar value producing a new vector
Staticslerpslerp
Constructs a new vector using spherical linear interpolation on each component from two vectors.
Staticsubtractsubtract
Subtract two vectors to produce a new vector (v1-v2)
StatictotoString
Create a string representation of a vectorxz
Optionaloptions: { decimals?: number; delimiter?: string }
Utilities operating on VectorXZ objects. All methods are static and do not modify the input objects.