Add some amount to the bipolar value, clipping it to the -1...1 range
let b = immutable(0);
b = b.add(0.5); // 0.5
Convert to 0..1 scale
let b = immutable(-1);
b.asScalar(); // 0
Interpolate toward target by amount
Inverse value
let b = immutable(1);
b = b.inverse(); // -1
Multiple the value by amount, clipping result
to the -1...1 range.
let b = immutable(1);
b = b.multiply(0.1); // 0.9
@param amount @returns
Nudge toward zero by amount
let b = immutable(1);
b = b.towardZero(0.1); // 0.9
Amount to nudge by
Modified copy
Current value
Wrapper around a bipolar value. Immutable.