Skip to content

Commit

Permalink
math: update Rect.intersects to use the correct top & bottom rect coo…
Browse files Browse the repository at this point in the history
…rdinate (#267)
  • Loading branch information
LeHaine authored Jul 24, 2024
1 parent 74684fc commit d922c20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/commonMain/kotlin/com/littlekt/math/Rect.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d922c20

Please sign in to comment.