mirror of
https://github.com/jhasse/poly2tri.git
synced 2025-08-03 13:55:39 +02:00
Do not compare doubles with ==
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
Reference in New Issue
Block a user