rj-action-library/Runtime/Math/Geometry/Overlap2D.cs

25 lines
422 B
C#
Raw Normal View History

2025-09-26 12:00:59 +00:00
using Godot;
using System.Collections;
using System.Collections.Generic;
namespace Rokojori
{
public class Overlap2D
{
public static bool Has( Box2 a, Box2 b )
{
if ( ! Range.Overlap( a.min.Y, a.max.Y, b.min.Y, b.max.Y ) )
{
return false;
}
if ( ! Range.Overlap( a.min.X, a.max.X, b.min.X, b.max.X ) )
{
return false;
}
return true;
}
}
}