Skip to content

Commit

Permalink
Fix compiler warning (-Wparentheses) (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
brunoabinader authored and mourner committed Sep 15, 2016
1 parent 6623985 commit 8d353b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/mapbox/earcut.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -666,8 +666,8 @@ template <typename N>
bool Earcut<N>::intersects(const Node* p1, const Node* q1, const Node* p2, const Node* q2) {
if ((equals(p1, q1) && equals(p2, q2)) ||
(equals(p1, q2) && equals(p2, q1))) return true;
return area(p1, q1, p2) > 0 != area(p1, q1, q2) > 0 &&
area(p2, q2, p1) > 0 != area(p2, q2, q1) > 0;
return (area(p1, q1, p2) > 0) != (area(p1, q1, q2) > 0) &&
(area(p2, q2, p1) > 0) != (area(p2, q2, q1) > 0);
}

// check if a polygon diagonal intersects any polygon segments
Expand Down

0 comments on commit 8d353b4

Please sign in to comment.