This pull request replaces the Matrix2 struct with a new Matrix3x2 struct. This is not the same as the System.Numerics.Matrix3x2.
Why not use System.Numerics
I would love to have this switched to using the System.Numerics.Matrix3x2 struct, however at this time it is currently to much work. MonoGame itself does not use the System.Numerics types currently, so implementing that here would mean that conversions would need to be made between Microsoft.Xna.Framework.Vector2 and System.Numerics.Vector2 all over the place. This would not only cause type ambiguity collisions within MonoGame.Extended, but also for consumers as well.
There is an open issue that can be tracked in the MonoGame repository for when MonoGame will switch to using System.Numericshttps://github.com/MonoGame/MonoGame/issues/7204. When the base MonoGame performs that change, MonoGame.Extended will then be updated to reflect that.
Issues Resolved
This PR also resolves issue #587 by correctly accounting negative scale.
Description
This pull request replaces the
Matrix2
struct with a newMatrix3x2
struct. This is not the same as theSystem.Numerics.Matrix3x2
.Why not use
System.Numerics
I would love to have this switched to using the
System.Numerics.Matrix3x2
struct, however at this time it is currently to much work. MonoGame itself does not use theSystem.Numerics
types currently, so implementing that here would mean that conversions would need to be made betweenMicrosoft.Xna.Framework.Vector2
andSystem.Numerics.Vector2
all over the place. This would not only cause type ambiguity collisions within MonoGame.Extended, but also for consumers as well.There is an open issue that can be tracked in the MonoGame repository for when MonoGame will switch to using
System.Numerics
https://github.com/MonoGame/MonoGame/issues/7204. When the base MonoGame performs that change, MonoGame.Extended will then be updated to reflect that.Issues Resolved
This PR also resolves issue #587 by correctly accounting negative scale.