Function scalePercent

Scales an input percentage value to an output range If you have an input percentage (0-1), scalePercent maps it to an output range of outMin-outMax.

import { scalePercent } from 'https://unpkg.com/ixfx/dist/data.js';
scalePercent(0.5, 10, 20); // 15

scalerPercent Returns a function

  • Parameters

    • v: number

      Value to scale

    • outMin: number

      Minimum for output

    • outMax: number

      Maximum for output

    Returns number