diff --git a/lib/helpers/hull.rb b/lib/helpers/hull.rb index a59cb07..6658f61 100644 --- a/lib/helpers/hull.rb +++ b/lib/helpers/hull.rb @@ -23,6 +23,8 @@ module Hull def self.get_hull(vector) concave_hull(vector, 5) || convex_hull(vector) + rescue SystemStackError + convex_hull(vector) end # vector of unique points