Three kinds of integral functions in java are summarized
- 2020-05-16 06:55:16
- OfStack
As follows:
1. Rounding off decimals :Math.floor(3.5)=3
2. 4 rounds 5 :Math.rint(3.5)=4
3. Rounding :Math.ceil(3.1)=4
As follows:
1. Rounding off decimals :Math.floor(3.5)=3
2. 4 rounds 5 :Math.rint(3.5)=4
3. Rounding :Math.ceil(3.1)=4