Skip to content
Permalink
Browse files

Spell again

  • Loading branch information
nyalldawson committed Mar 19, 2021
1 parent 0c5ffe7 commit b4f890e5f9efe0684749b9bc98814d3f60084ac6
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/core/geometry/qgsgeometryutils.cpp
@@ -638,11 +638,11 @@ void QgsGeometryUtils::perpendicularOffsetPointAlongSegment( double x1, double y
const double mY = y1 + ( y2 - y1 ) * proportion;
const double pX = x1 - x2;
const double pY = y1 - y2;
double normalX = -pY; //#spellok
double normalY = pX;
double normalX = -pY;
double normalY = pX; //#spellok
const double normalLength = sqrt( ( normalX * normalX ) + ( normalY * normalY ) ); //#spellok
normalX /= normalLength; //#spellok
normalY /= normalLength;
normalX /= normalLength;
normalY /= normalLength; //#spellok

*x = mX + offset * normalX;
*y = mY + offset * normalY; //#spellok

0 comments on commit b4f890e

Please sign in to comment.