Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "stats/incr/range/docs/types/index.d"

Index

Type aliases

Functions

Type aliases

accumulator

accumulator: (x?: undefined | number) => number | null

If provided a value, returns an updated range; otherwise, returns the current range.

Notes

  • If provided NaN or a value which, when used in computations, results in NaN, the accumulated value is NaN for all future invocations.
param

value

returns

range

Type declaration

    • (x?: undefined | number): number | null
    • Parameters

      • Optional x: undefined | number

      Returns number | null

Functions

Export assignment incrrange

  • Returns an accumulator function which incrementally computes a range.

    Returns accumulator

    accumulator function

    Example

    var accumulator = incrrange();
    
    var v = accumulator();
    // returns null
    
    v = accumulator( 2.0 );
    // returns 0.0
    
    v = accumulator( -1.0 );
    // returns 3.0
    
    v = accumulator( -3.0 );
    // returns 5.0
    
    v = accumulator();
    // returns 5.0