summaryrefslogtreecommitdiff
path: root/src/mathc99.cc
diff options
context:
space:
mode:
authormeta <s@w23.at>2011-01-17 23:52:45 (GMT)
committermeta <s@w23.at>2011-01-17 23:52:45 (GMT)
commit438d5cfbc80b128f49c31e57749f937fecfe01b2 (patch)
treeeb0dce609cbb504ade8ee6cfd0241ccc3c03196b /src/mathc99.cc
parent5c9ca91c2ce39f23246c95d23a982ac0f5721e28 (diff)
add some more missing C99 math.h functions
Diffstat (limited to 'src/mathc99.cc')
-rw-r--r--src/mathc99.cc17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/mathc99.cc b/src/mathc99.cc
index db71059..335446e 100644
--- a/src/mathc99.cc
+++ b/src/mathc99.cc
@@ -1,5 +1,18 @@
#include "mathc99.h"
-double found(double a) {
- return a > 0 ? floor(a+0.5) : ceil(a-0.5);
+#ifdef WIN32
+#include <algorithm>
+
+double round(double a) {
+ return a > 0 ? floor(a+0.5) : ceil(a-0.5);
+}
+
+float fmin(float a, float b) {
+ return std::min(a,b);
}
+
+float fmax(float a, float b) {
+ return std::max(a,b);
+}
+
+#endif
contact: Jan Huwald // Impressum