diff options
author | Marius Kintel <marius@kintel.net> | 2011-04-12 15:51:45 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-04-12 15:51:45 (GMT) |
commit | 1754a970a76c071fff91cc7c716aa0b78b4ac6be (patch) | |
tree | 5faa0fad3b5324423cd44413d5fdd16c586c1e29 /src/mathc99.cc | |
parent | 592ca6abadcb6443629be4407b973279a891278c (diff) | |
parent | a3cfe9e6d76f41cbd13711d1bc3843afe3d14f2d (diff) |
Merge branch 'master' of github.com:openscad/openscad
Diffstat (limited to 'src/mathc99.cc')
-rw-r--r-- | src/mathc99.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mathc99.cc b/src/mathc99.cc new file mode 100644 index 0000000..335446e --- /dev/null +++ b/src/mathc99.cc @@ -0,0 +1,18 @@ +#include "mathc99.h"
+
+#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
|