Open ioistired opened 6 years ago
So I've finally given some thought to this idea.
If someone puts in 20°
, the naive approach will result in the output being the same result in radians. This might be ok if people are aware of the behavior. If someone puts in asin(sin(20°))
without an understanding of how things work they might end up very confused. This might be a reasonable trade off for convenience though.
If the calculator had a stronger type system, I'd suggest putting degrees at the type level and having some smart conversions between degrees and radians, as well as smarter output, but unfortunately we don't have that.
To do this, replace
x°
withrad(x)
.