Skip to content

Commit

Permalink
fix(GeometryUtils): make isInBounds static
Browse files Browse the repository at this point in the history
  • Loading branch information
DataM0del committed Dec 20, 2024
1 parent c3469c4 commit 6a01aa4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/kotlin/info/opensigma/util/math/GeometryUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ object GeometryUtils {
* @param relative Whether the right and down points are relative to the left and up points.
* @return Whether the X and Y coordinates are in the provided bounds.
*/
@JvmStatic
fun isInBounds(x: Double, y: Double, left: Double, up: Double, right: Double, down: Double, relative: Boolean) =
if (relative) x in left..(left + right) && y in up..(up + down)
else x in left..right && y in up..down
Expand Down

0 comments on commit 6a01aa4

Please sign in to comment.