From d922c2084b6d4cbb0a9084b56dc3742a188d0733 Mon Sep 17 00:00:00 2001 From: Colt Daily Date: Wed, 24 Jul 2024 08:40:32 -0400 Subject: [PATCH] math: update Rect.intersects to use the correct top & bottom rect coordinate (#267) --- core/src/commonMain/kotlin/com/littlekt/math/Rect.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/commonMain/kotlin/com/littlekt/math/Rect.kt b/core/src/commonMain/kotlin/com/littlekt/math/Rect.kt index ba5621a43..2487152da 100644 --- a/core/src/commonMain/kotlin/com/littlekt/math/Rect.kt +++ b/core/src/commonMain/kotlin/com/littlekt/math/Rect.kt @@ -44,7 +44,7 @@ open class Rect( } /** @return true if this [Rect] intersects with the target [rect]. */ - fun intersects(rect: Rect) = intersects(left = rect.x, rect.y, rect.x2, rect.y2) + fun intersects(rect: Rect) = intersects(left = rect.x, rect.y2, rect.x2, rect.y) /** * @param left the left-most coordinates