void Polygon::ensureCWOrder() { if (!isCW()) reverseVertexOrder(); }
Polygon Polygon::ccw() const { Polygon ccw(size()); if(isCW()) std::reverse_copy(begin(), end(), ccw.begin()); else std::copy(begin(), end(), ccw.begin()); return ccw; }