-
Notifications
You must be signed in to change notification settings - Fork 116
Fix comparison of translation parts in MSG type identification #382
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
Conversation
@atztogo I am not sure how to name the function |
ef573f2
to
50852f1
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #382 +/- ##
===========================================
+ Coverage 83.80% 83.84% +0.04%
===========================================
Files 24 24
Lines 8167 8172 +5
===========================================
+ Hits 6844 6852 +8
+ Misses 1323 1320 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Thanks for your fix @lan496.
No idea.
D means double. You can change if you want. |
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.
Looks good to me.
@atztogo Thank you. I think no need to change the function name. |
When we compare two translation parts, we consider they are equal when the displacements is zero module 1. For this comparison, `mat_Dmod1` is not appropriate because, for example, mat_Dmod1(0 - eps) = 1 - eps for eps > 0. This commit adds a new function `mat_rem1`, which is similar to numpy's fmod. For the example, abs(mat_rem1(0 - eps)) = abs(-eps) = eps gives the smallest displacement.
Co-authored-by: Cristian Le <github@lecris.me>
Fixes: #381
When we compare two translation parts, we consider they are equal when the displacement is zero in module 1. For this comparison,
mat_Dmod1
is not appropriate because, for example, mat_Dmod1(0 - eps) = 1 - eps for eps > 0.This commit adds a new function
mat_rem1
, which is similar to numpy's fmod. For the example, abs(mat_rem1(0 - eps)) = abs(-eps) = eps gives the smallest displacement.