repl.txt (563B)
1 2 {{alias}}( iterator ) 3 Computes the mid-range of all iterated values. 4 5 The mid-range is the arithmetic mean of maximum and minimum values. 6 Accordingly, the mid-range is the midpoint of the range and a measure of 7 central tendency. 8 9 Parameters 10 ---------- 11 iterator: Object 12 Input iterator. 13 14 Returns 15 ------- 16 out: number|null 17 Mid-range. 18 19 Examples 20 -------- 21 > var arr = {{alias:@stdlib/array/to-iterator}}( [ 1.0, -2.0, 3.0, -4.0 ] ); 22 > var v = {{alias}}( arr ) 23 -0.5 24 25 See Also 26 -------- 27