Skip to content
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

Change the code to conform to the documentation in Celledoni.pdf #2349

Merged
merged 2 commits into from
Oct 2, 2019

Conversation

pleroy
Copy link
Member

@pleroy pleroy commented Oct 2, 2019

  1. Avoid using absolute values everywhere.
  2. Avoid using divisions when multiplications would work.

physics/euler_solver_body.hpp Show resolved Hide resolved
@@ -59,30 +59,30 @@ EulerSolver<PrincipalAxesFrame>::EulerSolver(
// cancellations.
auto const Δ₁ = m.y * m.y * I₂₁ / I₂ + m.z * m.z * I₃₁ / I₃;
auto const Δ₂ = m.x * m.x * I₁₂ / I₁ + m.z * m.z * I₃₂ / I₃;
auto const Δ₃ = m.x * m.x * I₃₁ / I₁ + m.y * m.y * I₃₂ / I₂;
auto const Δ₃ = m.x * m.x * I₁₃ / I₁ + m.y * m.y * I₂₃ / I₂;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rewrite these lines so that the cyclic permutation is obvious.

Sorry, something went wrong.

physics/euler_solver_body.hpp Outdated Show resolved Hide resolved
physics/euler_solver_body.hpp Outdated Show resolved Hide resolved
physics/euler_solver_body.hpp Outdated Show resolved Hide resolved
@eggrobin eggrobin added the LGTM label Oct 2, 2019
@pleroy pleroy merged commit a425a94 into mockingbirdnest:master Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants