This repository was archived by the owner on Nov 19, 2020. It is now read-only.

Description
Hi,
I'm relatively new to Ransac but I've stumbled across an odd bug;
In the case that the distances function returns 0 inliers on it's first attempt (i.e. before bestInliers is set) then N evaluates to '-Infinty' (not sure why -Infinity rather than +Infinity?) causing the while loop to end on its first attempt (as then count > -Infinity).
Propose for line 332 :
((bestInliers == null && inliers.Length > 0) || inliers.Length > maxInliers) (... or something more elegant!)
Cheers,
James