Scale a number to bipolar range (-1..1). Not clamped to scale.
import { Bipolar } from 'https://unpkg.com/ixfx/dist/data.js';// Scale 100 on 0..100 scaleBipolar.scale(100, 0, 100); // 1Bipolar.scale(50, 0, 100); // 0Bipolar.scale(0, 0, 100); // -1 Copy
import { Bipolar } from 'https://unpkg.com/ixfx/dist/data.js';// Scale 100 on 0..100 scaleBipolar.scale(100, 0, 100); // 1Bipolar.scale(50, 0, 100); // 0Bipolar.scale(0, 0, 100); // -1
Value to scale
Minimum of scale
Maximum of scale
Bipolar value on -1..1 scale
Scale a number to bipolar range (-1..1). Not clamped to scale.