Rounding Operations
Ceiling, flooring and rounding are mathematical functions that help with converting floating point numbers to the nearest whole numbers.
- ceiling - Gives always the next largest whole number. Example: ,
- flooring - Gives always the next smallest whole number. Example: ,
- rounding - Rounds to the nearest whole number. Example: , , ,
using in programming
These functions are useful in programming problems. In Java, the math class already provides all three methods.