added roundf to libnotimpl
authorJohn Crispin <john@openwrt.org>
Tue, 9 Oct 2007 21:37:05 +0000 (21:37 +0000)
committerJohn Crispin <john@openwrt.org>
Tue, 9 Oct 2007 21:37:05 +0000 (21:37 +0000)
SVN-Revision: 9223

libs/libnotimpl/src/math.c

index 66bcb62..31e6293 100644 (file)
     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));
+}      
+