clampScalar method
Implementation
Vector4 clampScalar(num minVal, num 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));
w = Math.max(minVal, Math.min(maxVal, w));
return this;
}