Browse Source

AP_Math: fix float-equals warnings

master
Peter Barker 7 years ago committed by Peter Barker
parent
commit
fa5757f618
  1. 2
      libraries/AP_Math/vector2.h

2
libraries/AP_Math/vector2.h

@ -243,7 +243,7 @@ struct Vector2 @@ -243,7 +243,7 @@ struct Vector2
} else {
const float expected_slope = (seg_end.y-seg_start.y)/expected_run;
const float intersection_slope = (point.y-seg_start.y)/intersection_run;
if (expected_slope != intersection_slope) {
if (fabsf(expected_slope - intersection_slope) > FLT_EPSILON) {
return false;
}
}

Loading…
Cancel
Save