ixfx
    Preparing search index...
    • Normalises an array using the min-max technique.

      This version returns additional context of the normalisation, alternatively use array

      const c = arrayWithContext(someValues);
      c.values; // Array of normalised values
      c.original; // Original input array
      c.min / c.max / c.range

      By default, computes min and max values based on contents of values. Clamping is not required for this case, so it's false by default.

      Parameters

      • values: readonly number[]

        Values

      • options: Partial<MinMaxArrayOptions> = {}

        Optionally uses 'minForced' and 'maxForced' properties to scale values instead of actual min/max values of data.

      Returns { max: number; min: number; original: any[]; range: number; values: number[] }