-
-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Matrix2d type name #1046
Comments
/// The type used for matrices. randomly dropping by to comment.. I haven't followed in detail for a while. But this seems ok, 'Matrix2x3' might be more explicit but a 2x3 is the most general '2d transformation matrix'; a pure 2x2 isn't a complete transformation. But maybe '2d' really suggests 2x2 to you ? I've seen conventions where people just assume 'Vector' and 'Matrix' mean the most common cases (vector4 and 4x4 matrix), then increasing amounts of information in postfixes say whats different I guess you can only resolve this sort of thing by polling a large number of people. |
Yes, this is exactly my point, names like On the other hand, |
The crate itself is called |
Well, I fear most users will need to transform both 2d and 3d objects, so I'd prefer to be explicit and avoid forcing them to write |
The name The word
There are also non-linear transforms for 2D that does not use matrices. Naming it |
That said, the docs could be improved. |
I am not sure I understand your arguments in favor of the name
I get your point that the word 'transform' can raise more general expectations than what the underlying matrix is capable of. Additionally I have seen the I really mean that |
Transform could mean SRT values; a Matrix is known as an efficient way to do a transformation.. something you can readily pass around , whilst 'transform' is something you might store in data structures (e.g. current states, animation paths..). Personally I've ended up with the term 'SRT' in my head from some 3d packages I've encountered as a handy acronym for 'transform' and by analogy SQT for Scale-Quaternion-Translation...but those terms might seem obscure ). Of course, transforms could include shearing, as such you might really want a matrix. does github allow polls? |
I prefer 'SRT' over 'Matrix' as it says what is the purpose of the type, but I am not a big fan of acronyms in general (except widely understood ones). Never seen any pool feature on github but I haven't used it a lot, so... |
Again, I'm not super familiar with the terminology used here (been a while since I took linear algebra and only used it occasionally since.). Would it make sense to have a Transform2D trait and just have the Matrix2D implement it? Then depend upon the Tranform2D type when a matrix is being used as a transform? That way you still have the generic data structure but your type signatures are clearer when its being used as a transform? Also it would allow type signatures like this to take a |
What is the rational for the name Matrix2d?
I find it misleading. When I first saw it in code, I interpreted it as the linear part of a transform, then I saw calls to trans().
The doc for this type is: "The type used for matrices." which is not particularly helpful.
IMHO Transform2d would be a more appropriate name. Are there contexts where this is not used as a transform?
The text was updated successfully, but these errors were encountered: