Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public struct Aabb
- {
- public Vector2 Min;
- public Vector2 Max;
- public Aabb(Vector2 min, Vector2 max)
- {
- Min = min;
- Max = max;
- }
- public bool Intersects(Aabb rhs)
- {
- return
- MinX <= rhs.MaxX
- && MinY <= rhs.MaxY
- && MaxX >= rhs.MinX
- && MaxY >= rhs.MinY;
- }
- }
Add Comment
Please, Sign In to add comment