diff --git a/poly2tri/common/utils.h b/poly2tri/common/utils.h index 1479fb5..6a20a00 100644 --- a/poly2tri/common/utils.h +++ b/poly2tri/common/utils.h @@ -71,7 +71,8 @@ Orientation Orient2d(const Point& pa, const Point& pb, const Point& pc) // Using a tolerance here fails on concave-by-subepsilon boundaries // if (val > -EPSILON && val < EPSILON) { - if (val == 0) { +// Using == on double makes -Wfloat-equal warnings yell at us + if (std::fpclassify(val) == FP_ZERO) { return COLLINEAR; } else if (val > 0) { return CCW;