MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / circular_distance

Function circular_distance

src/svgfill/src/arrange_polygons.cpp:2598–2605  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2596
2597template <typename Vec>
2598std::size_t circular_distance(typename Vec::const_iterator first,
2599 typename Vec::const_iterator last,
2600 const Vec& vec) {
2601 if (first <= last) {
2602 return static_cast<std::size_t>(last - first);
2603 }
2604 return static_cast<std::size_t>(vec.end() - first) + static_cast<std::size_t>(last - vec.begin());
2605}
2606
2607template <typename Vec, typename Pred>
2608std::pair<typename Vec::const_iterator,

Callers 1

clean_noisy_boundsFunction · 0.85

Calls 2

endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected