Files
aa/Shared/Models/Stateless/Location.cs
Mike Phares aa8de2b985 Removed Rectangle from LocationContainer
mapped-ids-then-whole-percentages-to-location-container

save-extract-faces
2025-07-05 22:30:19 -07:00

48 lines
1.3 KiB
C#

namespace View_by_Distance.Shared.Models.Stateless;
internal abstract class Location
{
internal static bool Check(int bottom, int left, int right, int top, int zCount, bool throwException)
{
bool result = true;
if (left < 0)
result = false;
if (right < 0)
result = false;
if (right < left)
result = false;
if (top < 0)
result = false;
if (bottom < 0)
result = false;
if (bottom < top)
result = false;
if (zCount < 0)
result = false;
if (throwException && !result)
throw new Exception();
return result;
}
internal static bool Check(int bottom, int height, int left, int right, int top, int width, int zCount, bool throwException)
{
bool result = true;
if (bottom > height)
result = false;
if (left > width)
result = false;
if (right > width)
result = false;
if (top > height)
result = false;
if (zCount < 0)
result = false;
if (result)
result = Check(bottom, left, right, top, zCount, throwException);
if (throwException && !result)
throw new Exception();
return result;
}
}