+ 1
Plz explain why a negative value inside a floor acts like ceiling and vice versa
Example.. System.out.print(Math.floor(3.6)); -->3 System.out.print(Math.floor(-3.6)); -->-4 //why not -3?
2 ответов
+ 10
Math.floor rounds the number you chose to the lower full number.
It is 3 because 3 < 3.6
It is -4 because -4 < -3.6