Add support for micromath#415
Conversation
|
I see now that num-traits is an optional feature of micromath. I'm not sure how or if that should be used. Probably because I never understood the purpose of num-traits. Many traits for numeric operations are already defined in the core and standard library. |
|
Another thing that I noticed is that my implementation could be applied to ratio also. Further, there are more functions which could be implemented, such as sqrt() |
|
Thanks for the PR! Another possible solution for trig functions on I also kicked off the tests, but it looks like there is some bitrot and the latest compiler is causing some errors unrelated to your changes. |
Hello,
First off, I'm a beginner in Rust so I don't expect this PR to be accepted without modifications. Feedback is very welcome.
The reson for adding this support is that I wanted to use uom in an embedded environment without support for std. I need support for trigonometric functions, but I still want to keep the power of unit analysis. This is an attempt at doing that.
One concern that I have about my contribution is that I think that there is too much copy pasting. I have played around with this for a while and I wasn't able to find a different way that works.