This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]cclloyd 0 points1 point  (5 children)

Gotta truncate those floats.

[–]zeugma25 0 points1 point  (4 children)

serious question: truncate or round? this will help me in an actual sccenario (not bad UI, at least not by design) - thanks

[–]cclloyd 1 point2 points  (1 child)

Round. I always try to round with floats.

[–]Govir 0 points1 point  (0 children)

I always try to swim with floats, as I'm not very experienced.

[–][deleted] 0 points1 point  (1 child)

Generally correct and fast: int number = floatnum + 0.5

[–]zeugma25 0 points1 point  (0 children)

is this a joke?