repl.txt (658B)
1 2 {{alias}}( x, n[, b] ) 3 Rounds a numeric value to the nearest number toward positive infinity with 4 `n` significant figures. 5 6 Parameters 7 ---------- 8 x: number 9 Input value. 10 11 n: integer 12 Number of significant figures. Must be greater than 0. 13 14 b: integer (optional) 15 Base. Must be greater than 0. Default: 10. 16 17 Returns 18 ------- 19 y: number 20 Rounded value. 21 22 Examples 23 -------- 24 > var y = {{alias}}( 3.14159, 5 ) 25 3.1416 26 > y = {{alias}}( 3.14159, 1 ) 27 4.0 28 > y = {{alias}}( 12368.0, 2 ) 29 13000.0 30 > y = {{alias}}( 0.0313, 2, 2 ) 31 0.046875 32 33 See Also 34 -------- 35