+ 1
What's the difference between ceil and round
3 Antworten
+ 6
In simple words,
ceil() will always return nearest higher integer.
round() will return nearest higher or lower integer.
+ 2
Just adding :
round results to less than or equal of 0.5 to 0.0 and greater than 0.5 to 1.0 for any decimal point position...
Where as ceil result both to 1.0
Ex :
round(0.4) =>0.0 ; ceil(0.4) => 1.0
round(0.7) =>1.0 ; ceil(0.7) => 1.0
0
cool