Skip to content
Snippets Groups Projects
Commit fc52adf3 authored by Magne.Stromsnes's avatar Magne.Stromsnes
Browse files

Guard against infinite loop

parent d6881114
No related branches found
No related tags found
1 merge request!44Point selection 2d
......@@ -63,7 +63,7 @@ convexHullGiftWrapping(const std::vector<QVector3D>& input)
// Set p as q for next iteration, so that q is added to
// result 'hull'
p = q;
} while (p != startingVertex); // While we don't come to first point
} while (p != startingVertex && output.size() < 6); // While we don't come to first point
return output;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment