added roundf to libnotimpl

git-svn-id: svn://svn.openwrt.org/openwrt/packages@9223 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
blogic 2007-10-09 21:37:05 +00:00
parent 2526880edb
commit 0a449f7abf

View File

@ -111,3 +111,18 @@
return (long) ((x - ((long)x) >= 0.5f) ? (((long)x) + 1) : ((long)x));
}
/* lround for uClibc
*
* wrapper for roundf(x)
*/
#ifdef __STDC__
float roundf(float x)
#else
float round(x)
float x;
#endif
{
return (float) ((x - ((long)x) >= 0.5f) ? (((long)x) + 1) : ((long)x));
}