floor and ceiling code example
Example 1: javascript ceiling
var ceiling1 = Math.ceil(4.7); //5
var ceiling2 = Math.ceil(-3.4); //-3
Example 2: 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