mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-14 19:29:36 +01:00
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:
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user