1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-26 04:17:33 +00:00

Fixed round_to_int to handle negative numbers properly

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1000 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Kevin Lyles 2008-02-19 03:33:12 +00:00
parent e39a3ad8e4
commit e7b786d79a

View File

@ -289,5 +289,9 @@ void update_stuff()
int round_to_int(float f)
{
if (f >= 0.0) {
return (int) (f + 0.5);
} else {
return (int) (f - 0.5);
}
}