summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/node.cxx3
-rw-r--r--starmath/source/rect.cxx5
2 files changed, 5 insertions, 3 deletions
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 3c78de3ba5b0..9408e62dbdfa 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -39,6 +39,7 @@
#include <rtl/math.hxx>
#include <cassert>
+#include <cstdlib>
#include <math.h>
#include <memory>
#include <float.h>
@@ -871,7 +872,7 @@ bool IsPointInLine(const Point &rPoint1,
static const double eps = 5.0 * DBL_EPSILON;
double fLambda;
- if (labs(rHeading2.X()) > labs(rHeading2.Y()))
+ if (std::abs(rHeading2.X()) > std::abs(rHeading2.Y()))
{
fLambda = (rPoint1.X() - rPoint2.X()) / static_cast<double>(rHeading2.X());
bRes = fabs(rPoint1.Y() - (rPoint2.Y() + fLambda * rHeading2.Y())) < eps;
diff --git a/starmath/source/rect.cxx b/starmath/source/rect.cxx
index 1c9ecb71ccdc..e3506c67de77 100644
--- a/starmath/source/rect.cxx
+++ b/starmath/source/rect.cxx
@@ -30,6 +30,7 @@
#include <smmod.hxx>
#include <cassert>
+#include <cstdlib>
namespace {
@@ -588,8 +589,8 @@ tools::Long SmRect::OrientedDist(const Point &rPoint) const
// build distance vector
Point aDist (aRef - rPoint);
- tools::Long nAbsX = labs(aDist.X()),
- nAbsY = labs(aDist.Y());
+ tools::Long nAbsX = std::abs(aDist.X()),
+ nAbsY = std::abs(aDist.Y());
return bIsInside ? - std::min(nAbsX, nAbsY) : std::max (nAbsX, nAbsY);
}