Nested for loop comparing every point along the line with each other and seeing if they are close enough in position, excluding the next 20 items in the line array from the point being checked
Oh, thanks for the explanation! :)