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

ODD(number) -> odd_number

 

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:

OOD(2) -> 3

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:

ODD(5.1573) -> 7

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:

ODD(9) -> 9