Fix the calculation of power in factorization

This commit is contained in:
Youmu 2020-07-16 16:35:20 -04:00
parent c3ce805672
commit c99a7d0950
1 changed files with 2 additions and 1 deletions

View File

@ -1121,10 +1121,11 @@ public:
;
/// It can be proved that the first match location is the length of match
auto primitiveSize = itMatch - pp2.m_path.begin();
auto originalLength = pp1.length();
CGAL_assertion(pp1.length() % primitiveSize == 0);
pp1.cut(primitiveSize);
CGAL_assertion(pp1.is_closed());
return std::make_pair(pp1, pp1.length() / primitiveSize);
return std::make_pair(pp1, originalLength / primitiveSize);
}
/// @return the turn between dart number i and dart number i+1.