mirror of
https://github.com/Relintai/mono.git
synced 2024-11-20 10:57:23 +01:00
POrted: [C#] Fix Encloses failing on shared upper bound for AABB and Rect2.
- AThousandShips
ee4396809c
This commit is contained in:
parent
04b42245d8
commit
e42467fe3a
@ -91,11 +91,11 @@ namespace Godot
|
|||||||
Vector3 dstMax = with._position + with._size;
|
Vector3 dstMax = with._position + with._size;
|
||||||
|
|
||||||
return srcMin.x <= dstMin.x &&
|
return srcMin.x <= dstMin.x &&
|
||||||
srcMax.x > dstMax.x &&
|
srcMax.x >= dstMax.x &&
|
||||||
srcMin.y <= dstMin.y &&
|
srcMin.y <= dstMin.y &&
|
||||||
srcMax.y > dstMax.y &&
|
srcMax.y >= dstMax.y &&
|
||||||
srcMin.z <= dstMin.z &&
|
srcMin.z <= dstMin.z &&
|
||||||
srcMax.z > dstMax.z;
|
srcMax.z >= dstMax.z;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -112,8 +112,8 @@ namespace Godot
|
|||||||
public bool Encloses(Rect2 b)
|
public bool Encloses(Rect2 b)
|
||||||
{
|
{
|
||||||
return b._position.x >= _position.x && b._position.y >= _position.y &&
|
return b._position.x >= _position.x && b._position.y >= _position.y &&
|
||||||
b._position.x + b._size.x < _position.x + _size.x &&
|
b._position.x + b._size.x <= _position.x + _size.x &&
|
||||||
b._position.y + b._size.y < _position.y + _size.y;
|
b._position.y + b._size.y <= _position.y + _size.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user