From 7d78a49419f108818b3489b60578a084e7ba8180 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Tue, 9 Oct 2007 21:37:05 +0000 Subject: [PATCH] added roundf to libnotimpl SVN-Revision: 9223 --- 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.30.2