MCPcopy Create free account
hub / github.com/AngusJohnson/Clipper2 / MakeRandomPoly

Function MakeRandomPoly

CPP/Examples/RectClipping/RectClipping.cpp:107–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107Path64 MakeRandomPoly(int width, int height, unsigned vertCnt)
108{
109 Path64 result;
110 result.reserve(vertCnt);
111 for (unsigned i = 0; i < vertCnt; ++i)
112 result.push_back(Point64(rand() % width, rand() % height));
113 return result;
114}
115
116PathD MakeRandomPolyD(int width, int height, unsigned vertCnt)
117{

Callers 1

MeasurePerformanceFunction · 0.70

Calls 1

Point64Class · 0.85

Tested by

no test coverage detected