Fix cg::edges
This commit is contained in:
parent
29e62192ce
commit
385efe5ff9
1 changed files with 4 additions and 1 deletions
|
|
@ -86,10 +86,13 @@ namespace psemek::cg
|
|||
|
||||
using index_type = std::remove_cvref_t<decltype((*std::begin(fs))[0])>;
|
||||
|
||||
using std::begin;
|
||||
using std::end;
|
||||
|
||||
std::vector<geom::segment<index_type>> result;
|
||||
for (auto const & f : fs)
|
||||
{
|
||||
for (auto it = std::begin(f), jt = std::prev(std::end(f)); ++it, ++jt; it != std::end(f))
|
||||
for (auto it = begin(f), jt = std::prev(end(f)); it != end(f); jt = it++)
|
||||
{
|
||||
geom::segment<index_type> s{*jt, *it};
|
||||
if (s[0] > s[1]) std::swap(s[0], s[1]);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue