Navigation Menu

Skip to content

Commit

Permalink
Fix build on some platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Mar 13, 2020
1 parent 970052d commit 02a94f0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/gui/processing/models/qgsmodelsnapper.cpp
Expand Up @@ -16,6 +16,7 @@

#include "qgsmodelsnapper.h"
#include "qgssettings.h"
#include <cmath>

QgsModelSnapper::QgsModelSnapper()
{
Expand Down Expand Up @@ -117,14 +118,14 @@ QPointF QgsModelSnapper::snapPointsToGrid( const QList<QPointF> &points, double
double xSnapped = xRatio * gridRes;
double ySnapped = yRatio * gridRes;

double currentDiffX = std::abs( xSnapped - point.x() );
double currentDiffX = std::fabs( xSnapped - point.x() );
if ( currentDiffX < smallestDiffX )
{
smallestDiffX = currentDiffX;
deltaX = xSnapped - point.x();
}

double currentDiffY = std::abs( ySnapped - point.y() );
double currentDiffY = std::fabs( ySnapped - point.y() );
if ( currentDiffY < smallestDiffY )
{
smallestDiffY = currentDiffY;
Expand Down

0 comments on commit 02a94f0

Please sign in to comment.