From ab7350bf2d9a1563e7f25a863607e174e5d01e8a Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 7 Dec 2015 14:51:46 +0100 Subject: [PATCH] Better fix for issue fixed in rev 6350 --- polygon/math_for_graphics.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/polygon/math_for_graphics.cpp b/polygon/math_for_graphics.cpp index 4503321a0d..5d1152afee 100644 --- a/polygon/math_for_graphics.cpp +++ b/polygon/math_for_graphics.cpp @@ -6,7 +6,7 @@ #include #include #include -#include // for abs function +#include // for abs function on ints #include static bool InRange( double x, double xi, double xf ); @@ -464,7 +464,7 @@ double GetPointToLineSegmentDistance( int x, int y, int xi, int yi, int xf, int { // vertical line segment if( InRange( y, yi, yf ) ) - return abs( x - xi ); + return std::abs( x - xi ); else return std::min( Distance( x, y, xi, yi ), Distance( x, y, xf, yf ) ); } @@ -472,7 +472,7 @@ double GetPointToLineSegmentDistance( int x, int y, int xi, int yi, int xf, int { // horizontal line segment if( InRange( x, xi, xf ) ) - return abs( y - yi ); + return std::abs( y - yi ); else return std::min( Distance( x, y, xi, yi ), Distance( x, y, xf, yf ) ); }