Vector4 clampLength(num min, num max) { var length = this.length(); return divideScalar(length).multiplyScalar(Math.max(min, Math.min(max, length))); }