Skip to content

Commit

Permalink
Remove unused function
Browse files Browse the repository at this point in the history
aka Rect::isPointInside
  • Loading branch information
IAmMoltony committed Oct 2, 2023
1 parent 18fc6b0 commit 4ef2a7a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
7 changes: 0 additions & 7 deletions include/rect.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,6 @@ class Rect
*/
bool intersects(const Rect &other);

/**
* @brief Check if there is a point inside of the rectangle
* @param px point X
* @param py point Y
*/
bool isPointInside(s16 px, s16 py);

/**
* @brief Draw the rectangle as an outline
* @param camera camera
Expand Down
5 changes: 0 additions & 5 deletions source/rect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ bool Rect::intersects(const Rect &other)
other.y + other.h < y);
}

bool Rect::isPointInside(s16 px, s16 py)
{
return (px >= x && px <= x + w && py >= y && py <= y + h);
}

void Rect::draw(const Camera &camera, int color)
{
glBoxStroke(x - camera.x, y - camera.y, w, h, color);
Expand Down

0 comments on commit 4ef2a7a

Please sign in to comment.