Summary of three rounding functions in Java
•
Java
As follows:
1. Rounding off decimals: math floor(3.5)=3
2. Rounding: math rint(3.5)=4
3. Rounding: math ceil(3.1)=4
The above summary of the three rounding functions in Java is all the content shared by Xiaobian. I hope it can give you a reference and support more programming tips.
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码