Fix corner cases like 0.251f in seconds-to-milliseconds conversion
authorparasti <parasti@78b8d119-cf0a-0410-b17c-f493084dd1d7>
Mon, 24 Jan 2011 10:34:03 +0000 (10:34 +0000)
committerparasti <parasti@78b8d119-cf0a-0410-b17c-f493084dd1d7>
Mon, 24 Jan 2011 10:34:03 +0000 (10:34 +0000)
commit27d1b67dc8c3e3b8aaa3ecea67e73e3de536d39a
treedb11d7b0eca287b8250dd67c360dad65fb3342fb
parent3701381d4389807d246c2c9e42a77a1960482043
Fix corner cases like 0.251f in seconds-to-milliseconds conversion

Do this by rounding the final floating-point value to the nearest
integer rather than simply casting to int.  Thanks to Elviz for
finding and debugging this.

(Also, it sucks to have to reimplement parts of C99.)

git-svn-id: https://s.snth.net/svn/neverball/trunk@3460 78b8d119-cf0a-0410-b17c-f493084dd1d7
share/common.h