-
Notifications
You must be signed in to change notification settings - Fork 27
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
Remove toggles for signed angle computations #445
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #445 +/- ##
==========================================
- Coverage 99.84% 99.84% -0.01%
==========================================
Files 23 23
Lines 1312 1301 -11
==========================================
- Hits 1310 1299 -11
Misses 2 2 ☔ View full report in Codecov by Sentry. |
@niksirbi I can pick this up if you want |
Thanks! Happy for you to take charge of reviewing this. |
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 great @willGraham01 ! 🚀
I just spotted a couple of references to old syntax, the other two are minor comments.
So nice to have this functionality 🤩
Description
What is this PR
Why is this PR needed?
See #438 - simplifies the call signature of functions that compute angles between vectors, and allows us to use precise language in our doc-strings when describing these quantities.
Also see #427.
Both of these issues were raised in #416, but were shifted to issues to reduce the PR complexity. Now that #416 is merged, we can apply these changes. Have tagged the original, hard-working reviewers from that PR here (but probably only one pair of eyes needed) 😅
What does this PR do?
Removes the option to toggle the "angle direction" in (high-level) functions that compute signed angles between two vectors, in some capacity. Specifically;
compute_forward_vector_angle
- this function has also had it's default angle unit switched to radians (previously degrees) to address Switchcompute_forward_vector_angle
to return radian angles by default #427,compute_angle_to_normal
,compute_{ego,allo}centric_angle_to_nearest_point
.The above functions already adhered to a consistent convention when their default values were used, which has been made the definition and standard.
The lower-level
compute_signed_angle_2d
function, that these functions all depend on, has retained it'sv_as_left_operand
argument. This is because the function is asymmetric in its arguments, and there may be cases where we really do want to swap the roles of the inputu
andv
.Small Test Suite Changes
One error-case test has been removed, since this is actually tested by
compute_signed_angle_2d
anyway - and in fact the error that is checked-for is raised within that function.A test that the
in_degrees
toggle forcompute_forward_vector_angle
has been added, since CodeCov was complaining.References
Closes #427.
Closes #438.
How has this PR been tested?
Since this is just removal of a feature, the now-irrelevant parts of the test suite have been removed. All other tests still pass with the adoption of the new convention.
Is this a breaking change?
No.
Does this PR require an update to the documentation?
No.
Checklist: