How to Round Float Numbers With Custom Ceil Floor Condition?

Rounding numbers is often the first step in analyzing data for checking for accuracy. In our example of rounding numbers, we will use custom ceiling and floor functions. The ceil function will round a number up and the floor will round a number down.

math ceil floor

By paramjeetdhimanparamjeetdhiman on Oct 02, 2020
//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

Add Comment

0

The steps provided below apply for both integer and floating point numbers.

Javascript answers related to "math ceil floor"

View All Javascript queries

Javascript queries related to "math ceil floor"

Browse Other Code Languages

CodeProZone