printfn / fend

Arbitrary-precision unit-aware calculator
https://printfn.github.io/fend
MIT License
668 stars 52 forks source link

rad/s is not recognized as radians/second #156

Closed OpenFoam-User closed 2 years ago

OpenFoam-User commented 2 years ago

Hello,

According to wikipedia: https://en.wikipedia.org/wiki/Radian_per_second, the radian per second has a symbol of rad/s.

But when I try the following:

> 10 RPM to rad/s
Error: cannot convert from rpm to rad / s: units 'second^-1' and 'meter^2 / second^3' are incompatible
> 

But this works:

 10 RPM to radians/s
approx. 1.0471975511 radians / s

Is there a reason to not allow the usage of rad/s instead of radians/s ?

Thank you

printfn commented 2 years ago

Hm, unfortunately rad currently refers to the Rad unit for radiation.

I think it'd nice if fend could auto-detect which unit you're referring to when doing conversions like that, so that e.g. 10 RPM to rad/s, as well as 1 Gy to rad could both work. I've been thinking of adding this sort of thing for other ambiguous units like C (celsius vs coulomb) or F (fahrenheit/farad) as well.

printfn commented 2 years ago

Fixed in version 1.0.3.

> 10 RPM to rad/s
approx. 1.0471975511 rad / s