Closed mrgreywater closed 8 years ago
The usage in the readme is outdated, it took me some time to figure out what changed.
earcut.vertices doesn't exist anymore, instead the indices refer to the input polygon vector https://github.com/mapbox/earcut.hpp/blame/master/README.md#L33
earcut.vertices
mapbox::Earcut<Coord, N> earcut; should be mapbox::Earcut<N> earcut; as Coord is automatically deduced https://github.com/mapbox/earcut.hpp/blame/master/README.md#L21
mapbox::Earcut<Coord, N> earcut;
mapbox::Earcut<N> earcut;
template <> struct nth<1, IntPoint> { inline static int64_t get(const IntPoint &t) { return t.X; }; };
should return t.Y; https://github.com/mapbox/earcut.hpp/blame/master/README.md#L61
return t.Y;
You're right, we need to update the docs. Thanks for flagging this! BTW, next time you're welcome to just send a pull request instead of listing corrections in description — it's just as fast to do. :)
The usage in the readme is outdated, it took me some time to figure out what changed.
earcut.vertices
doesn't exist anymore, instead the indices refer to the input polygon vector https://github.com/mapbox/earcut.hpp/blame/master/README.md#L33mapbox::Earcut<Coord, N> earcut;
should bemapbox::Earcut<N> earcut;
as Coord is automatically deduced https://github.com/mapbox/earcut.hpp/blame/master/README.md#L21should
return t.Y;
https://github.com/mapbox/earcut.hpp/blame/master/README.md#L61