From d804b4a5c140c28f135db9a1819f2ebfeb758f27 Mon Sep 17 00:00:00 2001 From: jsmorley Date: Fri, 29 Nov 2013 11:41:12 -0500 Subject: [PATCH] Common: Rename trunc in MathParser.cpp to trunc2 for VS2013 compatibility --- Common/MathParser.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Common/MathParser.cpp b/Common/MathParser.cpp index a3ed6cbe..1d34d815 100644 --- a/Common/MathParser.cpp +++ b/Common/MathParser.cpp @@ -97,7 +97,7 @@ struct Function }; static double frac(double x); -static double trunc(double x); +static double trunc2(double x); static double rad(double deg); static double sgn(double x); static double neg(double x); @@ -115,7 +115,7 @@ static Function g_Functions[] = { L"log", &log10, 3 }, { L"sqrt", &sqrt, 4 }, { L"frac", &frac, 4 }, - { L"trunc", &trunc, 5 }, + { L"trunc", &trunc2, 5 }, { L"floor", &floor, 5 }, { L"ceil", &ceil, 4 }, { L"round", (SingleArgFunction)&round, 5 }, @@ -846,7 +846,7 @@ static double frac(double x) return modf(x, &y); } -static double trunc(double x) +static double trunc2(double x) { return (x >= 0.0) ? floor(x) : ceil(x); }