Skip to content

Commit

Permalink
[#817] Area contains Point function added.
Browse files Browse the repository at this point in the history
  • Loading branch information
DjThunder committed Aug 13, 2024
1 parent da0b410 commit 87ba39b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lionengine-core/src/main/java/com/b3dgs/lionengine/geom/Area.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,17 @@ public interface Area extends Shape
*/
boolean contains(double x, double y);

/**
* Check if the area contains the point.
*
* @param point The point reference.
* @return <code>true</code> if contains, <code>false</code> else.
*/
default boolean contains(Point point)
{
return contains(point.getX(), point.getY());
}

/**
* Get the real width.
*
Expand Down

0 comments on commit 87ba39b

Please sign in to comment.