Math.ceil (double) rounded up

Math.ceil (6/5) ---> 1.0

5 and 6 are due int, this value corresponds Math.ceil (1.0)

Right should be Math.ceil ((double) 6/5) so the result is 2.0

Guess you like

Origin www.cnblogs.com/love-dream-88/p/11314799.html