Makes a scalar into a bipolar value.
That is, input range is 0..1, output range is -1...1
Bipolar.fromScalar(1); // 1Bipolar.fromScalar(0); // -1Bipolar.fromScalar(0.5); // 0 Copy
Bipolar.fromScalar(1); // 1Bipolar.fromScalar(0); // -1Bipolar.fromScalar(0.5); // 0
Throws an error if scalarValue is outside 0..1 scale.
scalarValue
Scalar value to convert
Bipolar value on -1..1 scale
Makes a scalar into a bipolar value.
That is, input range is 0..1, output range is -1...1
Throws an error if
scalarValue
is outside 0..1 scale.