summaryrefslogtreecommitdiff
path: root/indra/llmath
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2016-09-23 19:45:58 +0300
committerandreykproductengine <akleshchev@productengine.com>2016-09-23 19:45:58 +0300
commit21fdf0485fc4198ef6b159afb6577cbd31687fc4 (patch)
tree207944f628ffee632c67561f11f2f65a202c78dd /indra/llmath
parent2412725293b1715c596395e62b3da341e15b69ac (diff)
MAINT-6747 eliminating convertion error
Diffstat (limited to 'indra/llmath')
-rw-r--r--indra/llmath/llmath.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h
index 93b9f22b25..692284e04b 100644
--- a/indra/llmath/llmath.h
+++ b/indra/llmath/llmath.h
@@ -254,6 +254,11 @@ inline int round_int(double x)
}
#endif // BOGUS_ROUND
+inline F64 ll_round(const F64 val)
+{
+ return F64(floor(val + 0.5f));
+}
+
inline F32 ll_round( F32 val, F32 nearest )
{
return F32(floor(val * (1.0f / nearest) + 0.5f)) * nearest;