Move chunk enumerators to engine (#4901)

* Move chunk enumerators to engine

* notes

* Cleanup
This commit is contained in:
metalgearsloth
2024-02-23 17:51:34 +11:00
committed by GitHub
parent a77eee5658
commit a5d4b8096f
6 changed files with 78 additions and 50 deletions

View File

@@ -3,6 +3,7 @@ using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.Intrinsics;
using System.Runtime.Intrinsics.X86;
using JetBrains.Annotations;
using Robust.Shared.Utility;
namespace Robust.Shared.Maths
@@ -57,7 +58,17 @@ namespace Robust.Shared.Maths
}
/// <summary>
/// calculates the smallest AABB that will encompass the rotated box. The AABB is in local space.
/// Enlarges the box by the specified value.
/// </summary>
[Pure]
public readonly Box2Rotated Enlarged(float value)
{
var box = Box.Enlarged(value);
return new Box2Rotated(box, Rotation, Origin);
}
/// <summary>
/// Calculates the smallest AABB that will encompass the rotated box. The AABB is in local space.
/// </summary>
public readonly Box2 CalcBoundingBox()
{