ixfx
    Preparing search index...

    Type Alias NormaliseStreamContext

    NormaliseStreamContext: NumericRange & {
        reset: (minDefault?: number, maxDefault?: number) => void;
        seen: (v: number) => number;
        get max(): number;
        get min(): number;
        get range(): number;
    }

    Type declaration

    • reset: (minDefault?: number, maxDefault?: number) => void

      Reset the normaliser, by default to extreme ranges so it will calibrate after the next value.

    • seen: (v: number) => number

      Passes a value to the normaliser, getting back the normalised result

    • get max(): number

      Get the current max value of range.

      If no values have been passed through the stream it will be the initial maxDefault or Number.MIN_SAFE_INTEGER

    • get min(): number

      Get the current min value of range.

      If no values have been passed through the stream it will be the initial minDefault or Number.MAX_SAFE_INTEGER

    • get range(): number

      Gets the absolute range (ie. max-min) of the normaliser.

      If normaliser hasn't received any values it will use its default min/max.