Skip to content
Permalink
Browse files
Fix orthogonalize
  • Loading branch information
agiudiceandrea committed Aug 11, 2022
1 parent 36c4cda commit 663ae8a1b66f9b1eb46af047481349285df6e130
Showing 1 changed file with 4 additions and 0 deletions.
@@ -526,6 +526,10 @@ QgsVector calcMotion( const QgsPoint &a, const QgsPoint &b, const QgsPoint &c,
dotProduct += 1.0;

QgsVector new_v = p + q;
if ( qgsDoubleNear( new_v.length(), 0.0 ) )
{
return QgsVector( 0, 0 );
}
// 0.1 magic number from JOSM implementation - think this is to limit each iterative step
return new_v.normalized() * ( 0.1 * dotProduct * scale );
}

0 comments on commit 663ae8a

Please sign in to comment.