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

Function MakeRandomPoly

CPP/Examples/Benchmarks/Benchmarks.cpp:72–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72inline Path64 MakeRandomPoly(int width, int height, unsigned vertCnt)
73{
74 Path64 result;
75 result.reserve(vertCnt);
76 for (unsigned i = 0; i < vertCnt; ++i)
77 result.push_back(Point64(rand() % width, rand() % height));
78 return result;
79}
80
81void DoBenchmark(int edge_cnt_start, int edge_cnt_end,
82 int increment, bool test_polytree)

Callers 1

DoBenchmarkFunction · 0.70

Calls 1

Point64Class · 0.85

Tested by

no test coverage detected