-
Notifications
You must be signed in to change notification settings - Fork 462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add Clang sanitizer checks in CI #711
Conversation
89db472
to
b6b8638
Compare
c8c53fa
to
58be7a0
Compare
{0.659966917655, -2.1364398519395}, | ||
{0.659966917655, -2.1364398519396}}; | ||
{0.659966917656, -2.1364398519395}, | ||
{0.659966917657, -2.1364398519396}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did these need to be changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly they didn't need to - I was trying to adjust some test cases to get better coverage although I don't think I really accomplished that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My mistake, they do need to be changed because as defined this is a straight line. polygonToCells will reject straight lines now - even if a cell centroid is along the line - because it would have attempted to divide by zero when estimating.
double a = d * d / fmin(3.0, fabs((p1.lng - p2.lng) / (p1.lat - p2.lat))); | ||
double lngDiff = p1.lng - p2.lng; | ||
double latDiff = p1.lat - p2.lat; | ||
if (lngDiff == 0 || latDiff == 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For my info, how are NAN
and Infinity
values handled here? Do we need to check for something like isFinite
as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isfinite is checked below
Does this supersede #710? |
No, that PR appears to be addressing a different issue in the ratio calculation, it doesn't address the divide by zero problem. |
No description provided.