ixfx
    Preparing search index...

    Function scaleUnclamped

    • 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 scale
      Bipolar.scale(100, 0, 100); // 1
      Bipolar.scale(50, 0, 100); // 0
      Bipolar.scale(0, 0, 100); // -1

      Parameters

      • inputValue: number

        Value to scale

      • inMin: number

        Minimum of scale

      • inMax: number

        Maximum of scale

      Returns number

      Bipolar value on -1..1 scale