mapbox / earcut.hpp

Fast, header-only polygon triangulation
ISC License
858 stars 133 forks source link

Readme outdated and erroneous #22

Closed mrgreywater closed 8 years ago

mrgreywater commented 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

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


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

mourner commented 8 years ago

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. :)