Functions Index :: F :: FRound
Module:
Definition:
FRound(float x, int decimals)
Description:
Returns x rounded to decimals accuracy, taking care not to overflow during the intermediate calculations. The result is a float number.
Note that when using negative decimals it is possible to zero the result if x < 0.5*Pow(10,-decimals).
Examples:
f1 = 2.345613
f2 = FRound(f1, 2) # f2 == 2.34
f3 = 2132.345
f4 = FRound(f3, -2) # f4 == 2100