ixfx
    Preparing search index...

    Function clamp

    • Clamp a bipolar value

      import { Bipolar } from 'https://unpkg.com/ixfx/dist/data.js';
      Bipolar.clamp(-1); // -1
      Bipolar.clamp(-1.1); // -1

      Throws an error if bipolarValue is not a number or NaN.

      Parameters

      • bipolarValue: number

        Value to clamp

      Returns number

      Clamped value on -1..1 scale