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
Angles (Radians/Degrees) #5
Comments
Radians should be dimensionless, which is likely to cause trouble with tracking them in terms of units. |
Is there a problem with doing something like this? make_units! {
Angles, Unitless, one;
base {
Degree, degree, °;
}
} Then you have degrees and can use You can also add on any other units you would like to use. |
Oh cool. I'll start working on the library now if that's ok. What does |
It's the type for something with no units. Say you run make_units! {
MS, Unitless, one;
base {
Meter, m, m;
Second, s, s;
}
} Then you've created the There are some tutorials for using dimensioned here: http://paholg.com/project/dimensioned/ |
@droundy What do you mean by 'Radians should be dimensionless'? Is what I am saying not possible? |
I just mean that radians have no units. It's the name for a dimensionless Of course, if you don't want to actually do math, you can define angle as a On Wed, Dec 2, 2015, 6:30 PM Brendan Zabarauskas notifications@github.com
|
Hmm. It is really nice for documentation though, and picks up errors nicely if you mess up. Do you think |
I would find dimensioned to be overkill if all you want is to document that On Wed, Dec 2, 2015 at 7:01 PM Brendan Zabarauskas notifications@github.com
|
I am going to consider this closed. Feel free to re-open it if you have further questions, @bjz. |
👍 |
Should these be in a separate crate? I would like to derive the Radians unit from SI (
m * m^-1
), and have a conversion to/from Degrees. Then also make trigonometry functions with the correct units, as I do incgmath::angle
.The text was updated successfully, but these errors were encountered: