From 23d5240e07f77938da61be9c0fb8af639b6cb547 Mon Sep 17 00:00:00 2001 From: Gabriel Bizdoc Date: Wed, 24 Dec 2025 22:44:45 +0200 Subject: [PATCH] day 9 --- year25/day9/part2.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/year25/day9/part2.go b/year25/day9/part2.go index 72f1758..71565c5 100644 --- a/year25/day9/part2.go +++ b/year25/day9/part2.go @@ -79,7 +79,7 @@ func isP1InsideP2(p1, p2 []Vertex) bool { for _, rectangleVertex := range p1 { corner := rectangleVertex.Start // for each point of retangle // check if corner is on vertex. if yes we are fine - // count vertexes + // count vertices verticesPassed := 0 for _, v := range p2 { if isPointOnLine(corner, v) { @@ -102,11 +102,9 @@ func isP1InsideP2(p1, p2 []Vertex) bool { func isPointOnLine(p geometry.Point, l Vertex) bool { v := p.Subs(l.Start) w := l.End.Subs(l.Start) - if v.Line*w.Col != v.Col*w.Line { return false } - return w.Dot(p.Subs(l.End)) <= 0 } func polygonsIntersect(p1, p2 []Vertex) bool {