Skip to content
Permalink
Browse files

Fix build on some platforms

  • Loading branch information
nyalldawson committed Mar 13, 2020
1 parent 970052d commit 02a94f030ca5508ee08a37d9d26fe9a8c73404ac
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/gui/processing/models/qgsmodelsnapper.cpp
@@ -16,6 +16,7 @@

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

QgsModelSnapper::QgsModelSnapper()
{
@@ -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;

0 comments on commit 02a94f0

Please sign in to comment.
You can’t perform that action at this time.