using Syntriax.Engine.Core; namespace Syntriax.Engine.Physics2D.Primitives; public record AABB(Vector2D LowerBoundary, Vector2D UpperBoundary) { public static bool ApproximatelyEquals(AABB left, AABB right) => left.LowerBoundary.ApproximatelyEquals(right.LowerBoundary) && left.UpperBoundary.ApproximatelyEquals(right.UpperBoundary); } public static class AABBExtensions { public static bool ApproximatelyEquals(this AABB left, AABB right) => AABB.ApproximatelyEquals(left, right); }