Re:Cast-Free Arithmetic in Swift
by anon4 on Monday October 12, 2015 @02:55PM
(#10376354)
If you need to convert float to int, use an explicit rounding mode. Then adding 0.1f (or rather the closest fp approximation) ten times will round up to 10.
[ Parent
| on HN ]
There are no comments on this comment yet.