Common: Rename trunc in MathParser.cpp to trunc2 for VS2013 compatibility

This commit is contained in:
jsmorley 2013-11-29 11:41:12 -05:00
parent 3cfdc8c0b3
commit d804b4a5c1

View File

@ -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);
}