Make segment contain its edge

This allows segment snapping along its diagonals to the grid.

Fixes https://gitlab.com/kicad/code/kicad/issues/6924
This commit is contained in:
Seth Hillbrand 2021-01-03 12:46:20 -08:00
parent d1f782717e
commit 5a97764319
1 changed files with 3 additions and 3 deletions

View File

@ -170,5 +170,5 @@ bool SEG::Collide( const SEG& aSeg, int aClearance, int* aActual ) const
bool SEG::Contains( const VECTOR2I& aP ) const
{
return SquaredDistance( aP ) < 1; // 1 * 1 to be pedantic
return SquaredDistance( aP ) <= 1; // 1 * 1 to be pedantic
}