【发布时间】:2022-12-02 03:31:48
【问题描述】:
I am trying to round up 5.9999998 to 5.999.
But I have a problem, If I do round(number) it'll round it up to 6. How can I round a number like this to max 3 decimals?
【问题讨论】:
-
Read (study) both answers: stackoverflow.com/questions/13479163/round-float-to-x-decimals