Closed 0fv closed 2 years ago
Thank you for your work here. This functionality is already present in the TransformInPlace
function. The equivalent to the code in this PR is roughly:
import "github.com/twpayne/go-geom"
func Convert(g geom.T, f func(x, y double) (double, double)) {
geom.TransformInPlace(g, func(c geom.Coord) {
c[0], c[1] = f(c[0], c[1])
})
}
0fv:master https://github.com/twpayne/go-geom/pull/207#issuecomment-1023808120
I create a module for coords conversation
github.com/0fv/coords-convert