added roundf to libnotimpl
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Tue, 9 Oct 2007 21:37:05 +0000 (21:37 +0000)
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Tue, 9 Oct 2007 21:37:05 +0000 (21:37 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@9223 3c298f89-4303-0410-b956-a3cf2f4a3e73

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));
+}      
+