diff --git a/utilities/olcUTIL_Geometry2D.h b/utilities/olcUTIL_Geometry2D.h index 21f50c1..205820f 100644 --- a/utilities/olcUTIL_Geometry2D.h +++ b/utilities/olcUTIL_Geometry2D.h @@ -393,7 +393,7 @@ namespace olc::utils::geom2d // Checks if triangle overlaps with point template - inline constexpr bool overlaps(const circle& c, const olc::v2d_generic& p) + inline constexpr bool overlaps(const triangle& t, const olc::v2d_generic& p) { return contains(t, p); } @@ -659,7 +659,7 @@ namespace olc::utils::geom2d // Check if rectangle overlaps rectangle template - inline constexpr bool overlaps(const rect& l, const rect& r) + inline constexpr bool overlaps(const rect& r1, const rect& r2) { return (r1.pos.x < r2.pos.x + r2.size.x && r1.pos.x + r1.size.x >= r2.pos.x && r1.pos.y < r2.pos.y + r2.size.y && r1.pos.y + r1.size.y >= r2.pos.y); @@ -795,7 +795,7 @@ namespace olc::utils::geom2d // Check if rectangle overlaps circle template - inline constexpr bool overlaps(const rect& l, const circle& c) + inline constexpr bool overlaps(const rect& r, const circle& c) { return overlaps(c, r); }