From 3e3b1ada207ecaf93c9e562d7c1ca8728561ec78 Mon Sep 17 00:00:00 2001 From: Lucas Haley Date: Wed, 27 May 2026 14:06:23 -0700 Subject: [PATCH] intersect_circle? using resolved circles Prior version coerced inputs to circles, but then did not use the coerced circles. --- dragon/geometry.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dragon/geometry.rb b/dragon/geometry.rb index f381562e..b5b70e77 100644 --- a/dragon/geometry.rb +++ b/dragon/geometry.rb @@ -3,6 +3,10 @@ # MIT License # geometry.rb has been released under MIT (*only this file*). +# Contributors outside of DragonRuby who also hold Copyright: +# - Lucas Haley: https://github.com/lucashaley + + module GTK module Geometry def inside_rect? outer, tolerance = 0.0 @@ -935,7 +939,7 @@ def circle? shape def intersect_circle? circle_one, circle_two resolved_circle_one = rect_to_circle circle_one resolved_circle_two = rect_to_circle circle_two - distance_squared(circle_one, circle_two) <= (circle_one.radius + circle_two.radius)**2 + distance_squared(resolved_circle_one, resolved_circle_two) <= (resolved_circle_one.radius + resolved_circle_two.radius)**2 rescue Exception => e raise e, <<-S * ERROR: