Fix TransformBounds(Matrix3x2 , Box2Rotated) (#6171)

* jouneys-end

* test

* more tests

* test overkill

* i'm tired

* rip it out

* Keep method but mark it as obsolete

* Release notes

* grammar

---------

Co-authored-by: iaada <iaada@users.noreply.github.com>
Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
This commit is contained in:
āda
2025-09-13 00:11:59 -05:00
committed by GitHub
parent 6115d6d5cc
commit 5cecbb2cff
4 changed files with 10 additions and 29 deletions

View File

@@ -56,25 +56,6 @@ namespace Robust.UnitTesting.Shared.Maths
(new Box2(-1, 1, 1, 2), new Vector2(0, 0), -Math.PI/2, new Box2(1, -1, 2, 1)),
};
private static TestCaseData[] MatrixCases = new[]
{
new TestCaseData(Matrix3x2.Identity,
Box2Rotated.UnitCentered,
Box2Rotated.UnitCentered),
new TestCaseData(Matrix3x2.CreateRotation(MathF.PI),
Box2Rotated.UnitCentered,
new Box2Rotated(new Vector2(0.5f, 0.5f), new Vector2(-0.5f, -0.5f))),
new TestCaseData(Matrix3x2.CreateTranslation(Vector2.One),
Box2Rotated.UnitCentered,
new Box2Rotated(new Vector2(0.5f, 0.5f), new Vector2(1.5f, 1.5f))),
};
[Test, TestCaseSource(nameof(MatrixCases))]
public void TestBox2RotatedMatrices(Matrix3x2 matrix, Box2Rotated bounds, Box2Rotated result)
{
Assert.That(matrix.TransformBounds(bounds), Is.EqualTo(result));
}
private static TestCaseData[] MatrixBox2Cases = new[]
{
new TestCaseData(Matrix3x2.Identity,