Returns a two-way scaler
// Input range 0..100, output range 0..1const s = scalerTwoWay(0,100,0,1);// Scale from input to outputs.out(50); // 0.5// Scale from output range to inputs.in(1); // 100 Copy
// Input range 0..100, output range 0..1const s = scalerTwoWay(0,100,0,1);// Scale from input to outputs.out(50); // 0.5// Scale from output range to inputs.in(1); // 100
Optional
Returns a two-way scaler