M README.md => README.md +1 -0
@@ 29,3 29,4 @@ Full list of methods I added:
* `Rectangle.right`
* `Rectangle.bottom`
* `Rectangle.containsPoint`
+* `Rectangle.overlaps`
M binding.zig => binding.zig +3 -0
@@ 135,6 135,9 @@ pub const Rectangle = extern struct {
pub fn containsPoint(r: Rectangle, p: Vector2) bool {
return p.x >= r.x and p.x <= r.x + r.width and p.y >= r.y and p.y <= r.y + r.height;
}
+ pub fn overlaps(a: Rectangle, b: Rectangle) bool {
+ return (a.x + a.width > b.x and a.x < b.x + b.width and a.y + a.height > b.y and a.y < b.y + b.height);
+ }
};
pub const Image = extern struct {
M raylib => raylib +1 -1
@@ 1,1 1,1 @@
-Subproject commit c9864d8ac1345819ce5520da578f96dffae4e967
+Subproject commit 0959f6ebf69f44d5bb0225cc94fd187ebedf8be5