setLength method

Vector3 setLength(
  1. double length
)

Set this vector to a vector with the same direction as this one, but length l.

Implementation

Vector3 setLength(double length) {
  return normalize().multiplyScalar(length);
}