Wrapper for bipolar-based values. Immutable.
All functions will clamp to keep it in legal range.
letv = immutable(); // Starts with 0 by default v = v.add(0.1); // v.value is 0.1 v = v.inverse(); // v.value is -0.1 v = v.multiply(0.2); // v.value is -0.02
v = immutable(1); v = v.towardZero(0.1); // 0.9 v = v.interpolate(0.1, 1);
Wrapper for bipolar-based values. Immutable. All functions will clamp to keep it in legal range.
Wrapped values can be coerced into number: