Floor, Ceil and Rint code example
Example 1: ceil and floor
Examples of Floor:
=====================
Input : 2.5
Output : 2
Input : -2.1
Output : -3
Input : 2.9
Output : 2
===============================
Examples of Ceil:
=====================
Input : 2.5
Output : 3
Input : -2.1
Output : -2
Input : 2.9
Output : 3
Example 2: math ceil floor
//round up to the next highest value
Math.ceil(11.49); //12
//the greatest integer that is less than or equal to x
Math.floor(11.49); //11