Closed gibbz00 closed 10 months ago
Since geo-types is an interop crate, we try to keep it pretty svelte, and add functionality in the geo crate when possible. My instinct is that this new trait should live in geo, and we should keep the old (redundant) methods where they were for backwards compatibility, but what do other people think?
My project only uses geo_types, but I'm fine with moving it to geo. Might just become a bit odd that the to_radians/to_degrees methods exists for Point in geo_types but that one would have to pull in geo
for the rest.
It's less than ideal since geo
is heavier than geo-types
, but I'd rather see this get added to geo
. Then we could implement ToRadians
(and maybe FromRadians
?) for any G: CoordsIter
.
...I'd rather see this get added to
geo
. Then we could implementToRadians
... for anyG: CoordsIter
.
That's a really good idea! I was unaware of the existence of CoordsIter
. Closing this PR in favor of opening a new one with the suggested approach. ✌️
Previous struct methods
Point::to_degrees(self)
andPoint::to_radians(self)
are now behind the respective traits.CHANGES.md
if knowledge of this change could be valuable to users.