clampLength<T extends num> method

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

Implementation

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

  return divideScalar(length)
      .scale(math.max(min, math.min(max, length)));
}