summaryrefslogtreecommitdiffstats
path: root/src/util/math.h
diff options
context:
space:
mode:
authorMax Linke <kain88@mixxx.org>2014-04-25 19:58:14 +0200
committerMax Linke <kain88@mixxx.org>2014-04-25 20:06:08 +0200
commitb1df47132b8fa8e43e25be4c06a4a6392ca4a0ef (patch)
tree1a6b461a83a08b324f867cede45628329fae6a4b /src/util/math.h
parent18e570d5d661ac1e20a19d8ae3093ddef5a90a94 (diff)
fix windows build
Diffstat (limited to 'src/util/math.h')
-rw-r--r--src/util/math.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/util/math.h b/src/util/math.h
index 4156a67fcf..3c2f38f33d 100644
--- a/src/util/math.h
+++ b/src/util/math.h
@@ -63,4 +63,10 @@ inline int roundUpToPowerOf2(int v) {
return v;
}
+#ifdef __WINDOWS__
+inline int round(double x){
+ return x < 0.0 ? ceil(x - 0.5) : floor(x + 0.5);
+}
+#endif
+
#endif /* MATH_H */