projects
/
openwrt
/
svn-archive
/
packages.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
78a9249
)
added roundf to libnotimpl
author
John Crispin
<john@openwrt.org>
Tue, 9 Oct 2007 21:37:05 +0000
(21:37 +0000)
committer
John Crispin
<john@openwrt.org>
Tue, 9 Oct 2007 21:37:05 +0000
(21:37 +0000)
SVN-Revision: 9223
libs/libnotimpl/src/math.c
patch
|
blob
|
history
diff --git
a/libs/libnotimpl/src/math.c
b/libs/libnotimpl/src/math.c
index 66bcb6292f195da58edd621c87f899c99123f9b7..31e62931a398b30847d767249bcbe1e7f389ad3d 100644
(file)
--- 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));
+}
+