From 166d3b00ed5dd330e1e5af0036ec3714b2b86ae8 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Thu, 13 Oct 2011 20:33:19 +0000 Subject: [PATCH] - bugfix for mac osx --- source/shared_lib/include/graphics/math_util.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/shared_lib/include/graphics/math_util.h b/source/shared_lib/include/graphics/math_util.h index ed89864c..8a958e4a 100644 --- a/source/shared_lib/include/graphics/math_util.h +++ b/source/shared_lib/include/graphics/math_util.h @@ -275,8 +275,8 @@ inline T truncateDecimal(const T &value, int precision=6) { unsigned int uiTemp = (value * streflop::pow((streflop::Simple)10, (streflop::Simple)precision)) * iSigned; //Note I'm using unsigned int so that I can increase the precision of the truncate T result = (((double)uiTemp) / streflop::pow((streflop::Simple)10,(streflop::Simple)precision) * iSigned); #else - unsigned int uiTemp = (value * pow(10, precision)) * iSigned; //Note I'm using unsigned int so that I can increase the precision of the truncate - T result = (((double)uiTemp) / pow(10,precision) * iSigned); + unsigned int uiTemp = (value * pow((T)10, precision)) * iSigned; //Note I'm using unsigned int so that I can increase the precision of the truncate + T result = (((double)uiTemp) / pow((T)10,precision) * iSigned); #endif return result; }