r-quantities / units

Measurement units for R
https://r-quantities.github.io/units
175 stars 28 forks source link

atan2 returns non-angle with units arguments #250

Closed matzsm closed 4 years ago

matzsm commented 4 years ago
> packageVersion("units")
[1] ‘0.6.7’

> atan2(set_units(10, km), set_units(10, km))
0.7853982 [km]

Worse (not even numerically correct) if the units are not the same:

> atan2(set_units(10, km), set_units(10, mi))
0.7853982 [km]

Shouldn't any length be a valid argument here, and return an angle?

Enchufa2 commented 4 years ago

See #210.