Merge pull request #87264 from AThousandShips/aabb_fix_cs
[C#] Fix `Encloses` failing on shared upper bound for `AABB` and `Rect2(I)`
This commit is contained in:
commit
66736398cd
3 changed files with 7 additions and 7 deletions
|
@ -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 a new issue