Skip to content

Commit

Permalink
Add direction getters also to CircleBounds
Browse files Browse the repository at this point in the history
  • Loading branch information
albertvaka committed Feb 6, 2025
1 parent 1276628 commit 73670be
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions engine/bounds.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,10 @@ struct CircleBounds
#endif

[[nodiscard]] vec Center() const { return pos; }
[[nodiscard]] float Top() const { return pos.y - radius; }
[[nodiscard]] float Bottom() const { return pos.y + radius; }
[[nodiscard]] float Left() const { return pos.x - radius; }
[[nodiscard]] float Right() const { return pos.x + radius; }

[[nodiscard]] float DistanceSq(const BoxBounds& a) const { return a.DistanceSq(*this); }
[[nodiscard]] float Distance(const BoxBounds& a) const { return a.Distance(*this); }
Expand Down

0 comments on commit 73670be

Please sign in to comment.