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

First-class support for a degree based workflow #293

Open
KronosTheLate opened this issue Mar 22, 2024 · 1 comment
Open

First-class support for a degree based workflow #293

KronosTheLate opened this issue Mar 22, 2024 · 1 comment

Comments

@KronosTheLate
Copy link

If one wants to specify and read angles as degrees, it seems like one is out of luck with this package. Of course, one can always do

RotXYZ(deg2rad(10), deg2rad(20), deg2rad(30)) = RotXYZ(deg2rad.((10, 20, 30))...)

or

import Unitful: °
RotXYZ(10°, 20°, 30°)

While the first options are not terrible, I am not a fan. As for unitful, I do not like having to import a new package for simple conversion. And neither option solves printing as degrees.

Personally, I would love to have variants of the different representations that have a lowercase "d" appended, similar to sin and sind. So we would have RotAd, RotABd, RotABCd, AngleAxisd, and whatever other representations that take angles as input. These representation could store the input as degrees, and dispatch to e.g. sind instead of sin, and in that way close #196 and #197. They could also print those stored fields as degrees, without floating point conversions between radians. All in all I think it could be quite neat, for both exactness and to make a degree-based workflow feel first-class.

@KronosTheLate
Copy link
Author

Note: I have not used this package much, but I wanted such functionality when I realised that python has it: Inputs and outputs as degrees, specified by a keyword argument.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant