summaryrefslogtreecommitdiff
path: root/src/utils/mathutils.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-10-02 21:38:23 +0300
committerAndrei Karas <akaras@inbox.ru>2012-10-02 21:40:43 +0300
commit4cffca0da71771d0d51ba4cd4842d2d93aa2946e (patch)
tree99b974a5bab64174ebd29ef7a4761caef01acec8 /src/utils/mathutils.h
parent1dab21b236d76900f3ddd2be32f9590aef394c2d (diff)
downloadplus-4cffca0da71771d0d51ba4cd4842d2d93aa2946e.tar.gz
plus-4cffca0da71771d0d51ba4cd4842d2d93aa2946e.tar.bz2
plus-4cffca0da71771d0d51ba4cd4842d2d93aa2946e.tar.xz
plus-4cffca0da71771d0d51ba4cd4842d2d93aa2946e.zip
Fix some conversions.
Diffstat (limited to 'src/utils/mathutils.h')
-rw-r--r--src/utils/mathutils.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/mathutils.h b/src/utils/mathutils.h
index caed0d2f8..aa6dcecea 100644
--- a/src/utils/mathutils.h
+++ b/src/utils/mathutils.h
@@ -116,7 +116,7 @@ inline float weightedAverage(const float n1, const float n2, const float w)
inline int roundDouble(const double v)
{
- return (v > 0.0) ? (v + 0.5) : (v - 0.5);
+ return (v > 0.0) ? static_cast<int>(v + 0.5) : static_cast<int>(v - 0.5);
}
inline int powerOfTwo(const int input)