Add intersects method to Rectangle4i

Added compare methods to MathHelper
This commit is contained in:
Chicken-Bomes committed 2013-12-11 17:34:04 +10:00
1 parent 699221214c
commit 8a777b265e
2 files changed
+16

No files matched your search

+6
View File
@@ -39,4 +39,10 @@ public class Rectangle4i
{
return x <= px && px < x+w && y <= py && py < y+h;
}
public boolean intersects(Rectangle4i r)
{
return x <= r.x+r.w && r.x <= x+w &&
y <= r.y+r.h && r.y <= y+h;
}
}