ixfx
    Preparing search index...
    • Normalises an array using the min-max technique. By default uses the actual min/max of the array as the normalisation range.

      ixfx Guide on Normalising

      Use arrayWithContext to get back the min/max/range and original values

      // Yields: [0.5, 0.1, 0.0, 0.9, 1]
      Normalise.MinMax.array([5,1,0,9,10]);

      minForced and/or maxForced can be provided to use an arbitrary range.

      // Forced range 0-100
      // Yields: [0.05, 0.01, 0.0, 0.09, 0.10]
      Normalise.MinMax.array([5,1,0,9,10], { minForced: 0, maxForced: 100 });

      Return values are clamped to always be 0-1, inclusive.

      Parameters

      • values: readonly number[]

        Values

      • options: Partial<MinMaxArrayOptions> = {}

        Options to override or min/max values.

      Returns number[]