Fix zero failure in SEG::PointCloserThan().
Fixes: lp:1843329 * https://bugs.launchpad.net/kicad/+bug/1843329
This commit is contained in:
parent
18a76d3a87
commit
2278f40051
|
@ -40,9 +40,9 @@ bool SEG::PointCloserThan( const VECTOR2I& aP, int aDist ) const
|
|||
SEG::ecoord t = d.Dot( aP - A );
|
||||
|
||||
if( t <= 0 || !l_squared )
|
||||
return ( aP - A ).SquaredEuclideanNorm() < dist_sq;
|
||||
return ( aP - A ).SquaredEuclideanNorm() <= dist_sq;
|
||||
else if( t >= l_squared )
|
||||
return ( aP - B ).SquaredEuclideanNorm() < dist_sq;
|
||||
return ( aP - B ).SquaredEuclideanNorm() <= dist_sq;
|
||||
|
||||
int dxdy = abs( d.x ) - abs( d.y );
|
||||
|
||||
|
|
Loading…
Reference in New Issue