Replace Matrix3 with System.Numerics.Matrix3x2 (#27443)

Replace Matrix3 with Matrix3x2
This commit is contained in:
eoineoineoin
2024-06-02 05:07:41 +01:00
committed by GitHub
parent 21d0b1fd55
commit b44b159431
58 changed files with 236 additions and 215 deletions

View File

@@ -195,11 +195,11 @@ public partial class RadiationSystem
Vector2 srcLocal = sourceTrs.ParentUid == grid.Owner
? sourceTrs.LocalPosition
: gridTrs.InvLocalMatrix.Transform(ray.Source);
: Vector2.Transform(ray.Source, gridTrs.InvLocalMatrix);
Vector2 dstLocal = destTrs.ParentUid == grid.Owner
? destTrs.LocalPosition
: gridTrs.InvLocalMatrix.Transform(ray.Destination);
: Vector2.Transform(ray.Destination, gridTrs.InvLocalMatrix);
Vector2i sourceGrid = new(
(int) Math.Floor(srcLocal.X / grid.Comp.TileSize),