From 0a449f7abf4a49eaba2c86897606f83195157f0d Mon Sep 17 00:00:00 2001 From: blogic Date: Tue, 9 Oct 2007 21:37:05 +0000 Subject: [PATCH] added roundf to libnotimpl git-svn-id: svn://svn.openwrt.org/openwrt/packages@9223 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- libs/libnotimpl/src/math.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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)); +} + -- 2.11.0