Matrix argument ordering should be more straightforward
Summary
When a matrix is created, arguments are specified in a column-major order by the client. However, this sometimes leads to the wrong expectations, especially when glancing at the arguments at "face value".
The arguments for matrices should be interpreted based on their "face value" meaning, as this would be more intuitive.
Example
Unless you're familiar with the docs, the following is unlikely to be what you expected. The code below:
Matrix3 m = Matrix3f.createFrom(
new float[][] {
{ 1, 2, 3 },
{ 4, 5, 6 },
{ 7, 8, 9 }
}
);
would probably cause users to expect the following meaning:
| 1 2 3 |
| 4 5 6 |
| 7 8 9 |
But, this actually means:
| 1 4 7 |
| 2 5 8 |
| 3 6 9 |
Instead, it should mean the former, not the latter. The class should be responsible for transposing the values as an implementation detail in order to maintain its column-major ordering.
Benefits
It's more intuitive and less error-prone because you can rely on plain sight and intuition to get the correct interpretation. This should be a better solution than asking users to read the docs --which they should, but still ;)