The proposed patch above doesn't work (due to `det == 0` in the while-condition). I've fixed this with https://github.com/GeoLatte/geolatte-geom/pull/77 .