summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-02-21 00:10:57 +0300
committerAndrei Karas <akaras@inbox.ru>2012-02-21 01:03:28 +0300
commit2eef004b8b70861fd377ad50393a9a0ccbbbc152 (patch)
tree55e8350d51756c3da3dca5186e6f54826fa8482d /src/utils
parentf9abb45a7776fa158daef508f8287da267de002b (diff)
downloadmv-2eef004b8b70861fd377ad50393a9a0ccbbbc152.tar.gz
mv-2eef004b8b70861fd377ad50393a9a0ccbbbc152.tar.bz2
mv-2eef004b8b70861fd377ad50393a9a0ccbbbc152.tar.xz
mv-2eef004b8b70861fd377ad50393a9a0ccbbbc152.zip
Move some settings from video to visual page.
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/mathutils.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/utils/mathutils.h b/src/utils/mathutils.h
index 9f6818146..8ccd71e79 100644
--- a/src/utils/mathutils.h
+++ b/src/utils/mathutils.h
@@ -112,4 +112,9 @@ inline float weightedAverage(float n1, float n2, float w)
return w * n2 + (1.0f - w) * n1;
}
+inline int roundDouble(double v)
+{
+ return (v > 0.0) ? (v + 0.5) : (v - 0.5);
+}
+
#endif // UTILS_MATHUTILS_H