[C#] Fix `Encloses` failing on shared upper bound for `AABB` and
`Rect2(I)`
This commit is contained in:
parent
107f2961cc
commit
227a165ce4
|
@ -98,11 +98,11 @@ namespace Godot
|
|||
Vector3 dstMax = with._position + with._size;
|
||||
|
||||
return srcMin.X <= dstMin.X &&
|
||||
srcMax.X > dstMax.X &&
|
||||
srcMax.X >= dstMax.X &&
|
||||
srcMin.Y <= dstMin.Y &&
|
||||
srcMax.Y > dstMax.Y &&
|
||||
srcMax.Y >= dstMax.Y &&
|
||||
srcMin.Z <= dstMin.Z &&
|
||||
srcMax.Z > dstMax.Z;
|
||||
srcMax.Z >= dstMax.Z;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -123,8 +123,8 @@ namespace Godot
|
|||
public readonly bool Encloses(Rect2 b)
|
||||
{
|
||||
return b._position.X >= _position.X && b._position.Y >= _position.Y &&
|
||||
b._position.X + b._size.X < _position.X + _size.X &&
|
||||
b._position.Y + b._size.Y < _position.Y + _size.Y;
|
||||
b._position.X + b._size.X <= _position.X + _size.X &&
|
||||
b._position.Y + b._size.Y <= _position.Y + _size.Y;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -113,8 +113,8 @@ namespace Godot
|
|||
public readonly bool Encloses(Rect2I b)
|
||||
{
|
||||
return b._position.X >= _position.X && b._position.Y >= _position.Y &&
|
||||
b._position.X + b._size.X < _position.X + _size.X &&
|
||||
b._position.Y + b._size.Y < _position.Y + _size.Y;
|
||||
b._position.X + b._size.X <= _position.X + _size.X &&
|
||||
b._position.Y + b._size.Y <= _position.Y + _size.Y;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue