Skip to content
Permalink
Browse files
Fix orthogonalize
  • Loading branch information
agiudiceandrea authored and nyalldawson committed Aug 11, 2022
1 parent af9f432 commit 9c76c0730f037e25f5344cd1391302022612255c
Showing 1 changed file with 4 additions and 0 deletions.
@@ -525,6 +525,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 9c76c07

Please sign in to comment.