mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-17 00:04:02 -04:00
Fix incorrect 'left of' calculation when finding nearest point
to circular string
This commit is contained in:
parent
fd3a38fcd8
commit
e5b1c67594
@ -873,7 +873,8 @@ double QgsCircularString::closestPointOnArc( double x1, double y1, double x2, do
|
|||||||
|
|
||||||
if ( leftOf )
|
if ( leftOf )
|
||||||
{
|
{
|
||||||
*leftOf = clockwise ? sqrDistance > radius : sqrDistance < radius;
|
double sqrDistancePointToCenter = ( pt.x() - centerX ) * ( pt.x() - centerX ) + ( pt.y() - centerY ) * ( pt.y() - centerY );
|
||||||
|
*leftOf = clockwise ? sqrDistancePointToCenter > radius * radius : sqrDistancePointToCenter < radius * radius;
|
||||||
}
|
}
|
||||||
|
|
||||||
return sqrDistance;
|
return sqrDistance;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user