Functions Index :: R :: RoundOdd

[<< up one level]

Module:

numeric :: rounding

Definition:

RoundOdd(float x)

Description:

Returns the closest odd integer to its argument.

Rounding is made such that the previous even integer (odd - 1) rounds to odd, ie all values inside the interval [odd - 1..odd + 1) round to odd.

Examples:

ro1 = RoundOdd(6.0) # ro1 == 7

ro2 = RoundOdd(7.999999) # ro2 == 7

ro3 = RoundOdd(8.0) # ro3 == 9

 

[<< top]