normalize method
Convert this vector to a unit vector - that is, sets it equal to a vector with the same direction as this one, but length 1.
Implementation
Vector3 normalize() {
return divideScalar(length());
}
Convert this vector to a unit vector - that is, sets it equal to a vector with the same direction as this one, but length 1.
Vector3 normalize() {
return divideScalar(length());
}