ODD
The function ODD rounds a number up to the nearest odd integer.
This function takes a single Number as input. It returns another Number: the given number, rounded up to the nearest odd integer.
Declaration
Parameters
number (required, type: Number) The number to round.
Return Values
odd_number (type: Number) The given number, rounded up to the nearest odd integer.
Examples
The following example takes the even number 2 and rounds it up to the nearest odd integer:
The following example takes the number 5.1573 and rounds it up to 7. Note that it doesn't matter that 5.1573 is much closer to the odd number 5. The ODD function always rounds the given number up:
When given an odd integer, the ODD function simple returns the given number unmodified. This is what happens in the following example, when the ODD function takes the odd integer 7 as input:
Last updated