clampLength<T extends num> method

Vector3 clampLength<T extends num>(
  1. T min,
  2. T max
)

Implementation

Vector3 clampLength<T extends num>(T min, T max) {
  var length = this.length();

  return divideScalar(length).multiplyScalar(Math.max(min, Math.min(max, length)));
}