clampScalar method
Implementation
Vector3 clampScalar(minVal, maxVal) {
x = Math.max(minVal, Math.min(maxVal, x));
y = Math.max(minVal, Math.min(maxVal, y));
z = Math.max(minVal, Math.min(maxVal, z));
return this;
}
Vector3 clampScalar(minVal, maxVal) {
x = Math.max(minVal, Math.min(maxVal, x));
y = Math.max(minVal, Math.min(maxVal, y));
z = Math.max(minVal, Math.min(maxVal, z));
return this;
}