2024-01-23 18:39:25 +03:00
|
|
|
using Syntriax.Engine.Core;
|
|
|
|
|
|
|
|
namespace Syntriax.Engine.Physics2D.Primitives;
|
|
|
|
|
|
|
|
public record AABB(Vector2D LowerBoundary, Vector2D UpperBoundary)
|
|
|
|
{
|
2024-01-23 19:13:51 +03:00
|
|
|
public static bool ApproximatelyEquals(AABB left, AABB right)
|
|
|
|
=> left.LowerBoundary.ApproximatelyEquals(right.LowerBoundary) && left.UpperBoundary.ApproximatelyEquals(right.UpperBoundary);
|
|
|
|
}
|
2024-01-23 18:39:25 +03:00
|
|
|
|
2024-01-23 19:13:51 +03:00
|
|
|
public static class AABBExtensions
|
|
|
|
{
|
|
|
|
public static bool ApproximatelyEquals(this AABB left, AABB right) => AABB.ApproximatelyEquals(left, right);
|
2024-01-23 18:39:25 +03:00
|
|
|
}
|