ixfx
    Preparing search index...
    • Returns a function which can do min-max normalisation, baking-in the min and max values.

      // Normalise with min value of 20, max of 100
      const fn = compute(20, 100);

      // Use function with input value of 40
      fn(40);

      Parameters

      • min: number

        Minimum value of range

      • max: number

        Maximum value of range

      • clamp: boolean = false

        Whether to clamp input value to min/max range. Default: false

      Returns (value: number) => number