Open synercoder opened 1 year ago
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
No write access, but https://github.com/dotnet/dotnet-api-docs/labels/area-System.Numerics for those that do have write permissions.
Tagging subscribers to this area: @dotnet/area-system-numerics See info in area-owners.md if you want to be subscribed.
Author: | synercoder |
---|---|
Assignees: | - |
Labels: | `untriaged`, `Pri3`, `area-System.Numerics` |
Milestone: | - |
The current docs for Matrix3x2 have little to no "leading" info or remarks about the type. I would love to see here that the Matrix3x2 is meant to be used for 2d operations, and that this matrix is actually a 3x3 matrix of which the last column is always [0 0 1].
In the remarks of the
GetDeterminant
method, it is stated that the method treats the matrix as a 3x3, but the way the remark is made, it seems that this only applies to theGetDeterminant
method.When working in 2d space, you can chain multiple matrix operations together into a single matrix, by multiplying the matrixes. Multiplying matrixes is therefore a very important operation, so when I took a look at the source of the multiply method, it showed me that this code also treats the matrix as a 3x3 matrix with the last column as [0 0 1].
If the Matrix3x2 was truly a 3x2 matrix, the operator * should (NO NO NO, I AM NOT SUGGESTING WE DO THIS XD) instead be:
But this would invalidate all the use cases for 2d space, since the calculations for multiplying matrixes for 2d use are then incorrect.
So that is why I would love to see some documentation indicating that this is what the class should be used for, and a general remark that the Matrix works as a 3x3 matrix with a default last column of [0 0 1].
I would like to hear if I understood the code & it's use correctly, or what the thinking here is. If need be, I can create a PR addressing as such in the near future.