Trivial code formatting for some {.cpp,.h} files

This commit is contained in:
luz.paz
2020-04-03 12:30:58 -04:00
committed by Yorik van Havre
parent a45738c629
commit d36c3ebe57
14 changed files with 95 additions and 94 deletions

View File

@@ -425,29 +425,29 @@ void Polygon2d::Intersect (const Polygon2d &rclPolygon, std::list<Polygon2d> &rc
}
bool Polygon2d::Intersect (const Polygon2d &other) const {
if(other.GetCtVectors()<2 || GetCtVectors() < 2)
if (other.GetCtVectors()<2 || GetCtVectors() < 2)
return false;
for(auto &v : _aclVct) {
if(other.Contains(v))
for (auto &v : _aclVct) {
if (other.Contains(v))
return true;
}
if(Contains(other[0]))
if (Contains(other[0]))
return true;
for(size_t j=1; j<other.GetCtVectors(); ++j) {
for (size_t j=1; j<other.GetCtVectors(); ++j) {
auto &v0 = other[j-1];
auto &v1 = other[j];
if(Contains(v1))
if (Contains(v1))
return true;
Line2d line(v0, v1);
for(size_t i=0; i<GetCtVectors(); ++i) {
for (size_t i=0; i<GetCtVectors(); ++i) {
Line2d line2(At(i), At((i+1)%GetCtVectors()));
Vector2d v;
if(line.IntersectAndContain(line2, v))
if (line.IntersectAndContain(line2, v))
return true;
}
}