-
Notifications
You must be signed in to change notification settings - Fork 69
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
Permutation handedness #2413
Permutation handedness #2413
Conversation
geometry/permutation_body.hpp
Outdated
{PFT::YXZ, PTF::YXZ}}; | ||
return PTF(inverse.at(coordinate_permutation_)); | ||
if constexpr (std::is_same_v<CoordinatePermutation, EvenPermutation>) { | ||
switch (coordinate_permutation_) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Preference for an array instead of a switch.
geometry/permutation_body.hpp
Outdated
return OrthogonalMap<FromFrame, ToFrame>( | ||
Determinant(), | ||
Rotation<FromFrame, ToFrame>(quaternion.at(coordinate_permutation_))); | ||
Rotation<FromFrame, ToFrame>(quaternion[0b111 & |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's give a name to this mask and declare it next to INDEX
etc.
geometry/permutation_body.hpp
Outdated
0x3 & | ||
(static_cast<int>(coordinate_permutation_) >> (coordinate * 2))]; | ||
result[coordinate] = | ||
r3_element[0b11 & (static_cast<int>(coordinate_permutation_) >> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same, name the mask.
Permutation<Geocentric, Selenocentric>( | ||
Permutation<Geocentric, Selenocentric>::YXZ).Forget()), | ||
Permutation<Geocentric, Selenocentric>(EvenPermutation::YXZ) | ||
.Forget()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might fit on the previous line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No.
No description provided.