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

Function MakeRandomPoint

CPP/BenchMark/GetIntersectPtBenchmark.cpp:429–436  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

427}
428
429static inline Point64 MakeRandomPoint(int64_t min_val, int64_t max_val)
430{
431 std::random_device rd;
432 std::mt19937 gen(rd());
433 std::uniform_int_distribution<int64_t> x(min_val, max_val);
434 std::uniform_int_distribution<int64_t> y(min_val, max_val);
435 return Point64(x(gen), y(gen));
436}
437
438/////////////////////////////////////////////////////////
439// global data storage

Callers 1

mainFunction · 0.85

Calls 1

Point64Class · 0.85

Tested by

no test coverage detected