From a82916f4db40487feae357e52731fc80823a8f99 Mon Sep 17 00:00:00 2001
From: Alex Shvartzkop <dudesuchamazing@gmail.com>
Date: Sat, 8 Mar 2025 23:03:44 +0300
Subject: [PATCH] Improve performance of SEG::Contains.

---
 libs/kimath/src/geometry/seg.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libs/kimath/src/geometry/seg.cpp b/libs/kimath/src/geometry/seg.cpp
index b918fcb8d5..b370ea6eaa 100644
--- a/libs/kimath/src/geometry/seg.cpp
+++ b/libs/kimath/src/geometry/seg.cpp
@@ -320,7 +320,7 @@ bool SEG::Collide( const SEG& aSeg, int aClearance, int* aActual ) const
 
 bool SEG::Contains( const VECTOR2I& aP ) const
 {
-    return Distance( aP ) <= 1;
+    return SquaredDistance( aP ) <= 3;
 }