diff options
Diffstat (limited to 'connectivity/source')
-rw-r--r-- | connectivity/source/drivers/file/FNumericFunctions.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/connectivity/source/drivers/file/FNumericFunctions.cxx b/connectivity/source/drivers/file/FNumericFunctions.cxx index 7de058dee06c..7c7fdc75425f 100644 --- a/connectivity/source/drivers/file/FNumericFunctions.cxx +++ b/connectivity/source/drivers/file/FNumericFunctions.cxx @@ -19,14 +19,13 @@ #include <cmath> +#include <basegfx/numeric/ftools.hxx> #include <file/FNumericFunctions.hxx> #include <rtl/math.hxx> using namespace connectivity; using namespace connectivity::file; -const double fPi = 3.14159265358979323846; - ORowSetValue OOp_Abs::operate(const ORowSetValue& lhs) const { if ( lhs.isNull() ) @@ -162,7 +161,7 @@ ORowSetValue OOp_Sqrt::operate(const ORowSetValue& lhs) const ORowSetValue OOp_Pi::operate(const std::vector<ORowSetValue>& /*lhs*/) const { - return fPi; + return M_PI; } ORowSetValue OOp_Cos::operate(const ORowSetValue& lhs) const @@ -227,7 +226,7 @@ ORowSetValue OOp_Degrees::operate(const ORowSetValue& lhs) const return lhs; double nLhs = lhs.getDouble(); - return nLhs*180*(1.0/fPi); + return basegfx::rad2deg(nLhs); } ORowSetValue OOp_Radians::operate(const ORowSetValue& lhs) const @@ -236,7 +235,7 @@ ORowSetValue OOp_Radians::operate(const ORowSetValue& lhs) const return lhs; double nLhs = lhs.getDouble(); - return nLhs*fPi*(1.0/180.0); + return basegfx::deg2rad(nLhs); } |