-
Notifications
You must be signed in to change notification settings - Fork 147
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
Add to_angle
for the Rot2
class
#358
Conversation
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.
Cool, yeah I think this is a good thing to have
symforce/geo/rot2.py
Outdated
|
||
This is equivalent to ``to_tangent()[0]`` | ||
""" | ||
return sf.atan2(self.z.imag, self.z.real, epsilon=epsilon) |
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.
I think this should just call to_tangent
to avoid duplicating the implementation, like from_angle
does with from_tangent
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.
That makes sense, I changed it now.
It seems like it fails the lint checks. Do you have a special linter format? |
You need a type annotation for
You can run the linter with |
Thank you for the explanation. |
Looks like the thing that's failing now is the autoformat - |
|
No - everything that |
True, i used There are rather many files that are affected, but mostly for the same reasons:
After revering to the correct version of |
Now that all checks have passed, is there more I need to do before the review is passed and it can be merged? |
Thanks, makes sense
Nothing more you need to do, I'll merge it |
I suggest adding a convenience function to get the angle from a 2D rotation. It complements the existing
from_angle
, and is intuitive to use when working with 2D rotation angles.