From 20cf7c23e06629fe362818a9b3a7ff01c502babf Mon Sep 17 00:00:00 2001 From: Arash Partow Date: Sun, 27 Oct 2013 02:27:03 +1100 Subject: [PATCH] C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html --- exprtk.hpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/exprtk.hpp b/exprtk.hpp index cde89f4..8229211 100644 --- a/exprtk.hpp +++ b/exprtk.hpp @@ -589,7 +589,7 @@ namespace exprtk template inline T root_impl(const T v0, const T v1, real_type_tag) { - return std::pow(v0,T(1)/v1); + return std::pow(v0,T(1) / v1); } template @@ -604,13 +604,13 @@ namespace exprtk return ((v < T(0)) ? std::ceil(v - T(0.5)) : std::floor(v + T(0.5))); } - template - inline T roundn_impl(const T v0, const T v1, real_type_tag) - { - const int index = std::max(0, std::min(pow10_size - 1, (int)std::floor(v1))); - const T p10 = T(pow10[index]); - return T(std::floor((v0 * p10) + T(0.5)) / p10); - } + template + inline T roundn_impl(const T v0, const T v1, real_type_tag) + { + const int index = std::max(0, std::min(pow10_size - 1, (int)std::floor(v1))); + const T p10 = T(pow10[index]); + return T(std::floor((v0 * p10) + T(0.5)) / p10); + } template inline T roundn_impl(const T v0, const T, int_type_tag)