We get the just lower nearest integer from the number.
Here is a comparison between ceil(), floor() and round() function. For different input numbers we will get different values by using these functions.
Value
Floor()
ceil()
round()
2.7
2
3
3
2.4
2
3
2
2.5
2
3
3
2.48
2
3
2
2.62
2
3
3
2
2
2
2
-8.7
-9
-8
-9
-8.5
-9
-8
-9
-8.3
-9
-8
-8
-8.49
-9
-8
-8
-8.61
-9
-8
-9
-8
-8
-8
-8
Note that there is no point is using ceil() or floor() functions on integers directly. ( we will get the same value )
← Subscribe to our YouTube Channel here
This article is written by plus2net.com team.
https://www.plus2net.com