repl.txt (936B)
1 2 {{alias}}( [out] ) 3 Returns an accumulator function which incrementally computes a minimum and 4 maximum. 5 6 If provided a value, the accumulator function returns an updated minimum and 7 maximum. If not provided a value, the accumulator function returns the 8 current minimum and maximum. 9 10 If provided `NaN`, the minimum and maximum values are equal to `NaN` for all 11 future invocations. 12 13 Parameters 14 ---------- 15 out: Array|TypedArray (optional) 16 Output array. 17 18 Returns 19 ------- 20 acc: Function 21 Accumulator function. 22 23 Examples 24 -------- 25 > var accumulator = {{alias}}(); 26 > var mm = accumulator() 27 null 28 > mm = accumulator( 2.0 ) 29 [ 2.0, 2.0 ] 30 > mm = accumulator( -5.0 ) 31 [ -5.0, 2.0 ] 32 > mm = accumulator( 3.0 ) 33 [ -5.0, 3.0 ] 34 > mm = accumulator( 5.0 ) 35 [ -5.0, 5.0 ] 36 > mm = accumulator() 37 [ -5.0, 5.0 ] 38 39 See Also 40 -------- 41