From: blogic Date: Tue, 9 Oct 2007 21:37:05 +0000 (+0000) Subject: added roundf to libnotimpl X-Git-Url: http://207.154.207.93/?a=commitdiff_plain;h=0a449f7abf4a49eaba2c86897606f83195157f0d;p=packages.git added roundf to libnotimpl git-svn-id: svn://svn.openwrt.org/openwrt/packages@9223 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/libs/libnotimpl/src/math.c b/libs/libnotimpl/src/math.c index 66bcb6292..31e62931a 100644 --- a/libs/libnotimpl/src/math.c +++ b/libs/libnotimpl/src/math.c @@ -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)); +} +