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

@@ -25,11 +25,11 @@ public static class Matrix3Helpers
return a.EqualsApprox(b, (float) tolerance);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[Obsolete("Use TransformBox")]
// This method was previously broken, and now just returns an bounding box pretending to be a Box2Rotated
public static Box2Rotated TransformBounds(this Matrix3x2 refFromBox, Box2Rotated box)
{
var matty = Matrix3x2.Multiply(refFromBox, box.Transform);
return new Box2Rotated(Vector2.Transform(box.BottomLeft, matty), Vector2.Transform(box.TopRight, matty));
return new Box2Rotated(TransformBox(refFromBox, box));
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]