vle-roundto

Parent Previous Next

vle-roundto


(vle-roundto  x  digits)

returns the input value 'x' rounded to 'digits' number of decimal places (precision)

Arguments

'x' any integer or double number
'digits' integer number of digital places to round to

Return

the input value 'x' rounded to 'digits' number of decimal places (precision), as double

Example

(vle-roundto  1.23456789  1) => 1.2

(vle-roundto  1.23456789  2) => 1.23

(vle-roundto  1.23456789  3) => 1.235

(vle-roundto  1.23456789  4) => 1.2346

(vle-roundto  1.23456789  5) => 1.23457

(vle-roundto  1.23456789  6) => 1.234568

(vle-roundto  1.23456789  7) => 1.2345679

(vle-roundto  1.23456789  8) => 1.23456789

Alias


Remarks

if input value 'x' is an integer, it is automatically converted into double




©  Menhirs NV. All rights reserved.