when finding the third point which forms the smallest circumcircle with the first two, I noticed if 3 points happen to be vertically or horizontally collinear, d will get checked too late to prevent a division by zero. probably a rare case if using floats but just something I noticed (unless I missed the collinear check somewhere.)