Answers for "ceil and floor mathf"

4

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
Posted by: Guest on November-18-2020
0

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
Posted by: Guest on October-02-2020

Browse Popular Code Answers by Language