mirror of
https://github.com/jhasse/poly2tri.git
synced 2024-11-30 01:03:30 +01:00
Do not compare doubles with ==
This commit is contained in:
parent
0105437ff3
commit
e0ba327ed8
@ -132,11 +132,11 @@ struct Edge {
|
||||
if (p1.y > p2.y) {
|
||||
q = &p1;
|
||||
p = &p2;
|
||||
} else if (p1.y == p2.y) {
|
||||
} else if (std::abs(p1.y - p2.y) < 1e-10) {
|
||||
if (p1.x > p2.x) {
|
||||
q = &p1;
|
||||
p = &p2;
|
||||
} else if (p1.x == p2.x) {
|
||||
} else if (std::abs(p1.x - p2.x) < 1e-10) {
|
||||
// Repeat points
|
||||
throw std::runtime_error("Edge::Edge: p1 == p2");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user