Closed SimonN closed 7 years ago
Before, sprintf("%.2f", ...) rounded 0.999 to 1.00, urn cut off the leading 1 and appended the .00 to rounded-down seconds. This displayed 17:45.999 as 17:45.00 instead of 17:45.99.
Fixed by always rounding down with integers, never floats/doubles.
Tested & merged. Thank you.
Before, sprintf("%.2f", ...) rounded 0.999 to 1.00, urn cut off the leading 1 and appended the .00 to rounded-down seconds. This displayed 17:45.999 as 17:45.00 instead of 17:45.99.
Fixed by always rounding down with integers, never floats/doubles.