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 66bcb6292f195da58edd621c87f899c99123f9b7..31e62931a398b30847d767249bcbe1e7f389ad3d 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));
+}      
+