diff --git a/opensfm/src/geometry/triangulation.h b/opensfm/src/geometry/triangulation.h index fa4cf3632..06c3a0a2b 100644 --- a/opensfm/src/geometry/triangulation.h +++ b/opensfm/src/geometry/triangulation.h @@ -7,6 +7,7 @@ #include #include #include +#include double AngleBetweenVectors(const Eigen::Vector3d &u, const Eigen::Vector3d &v); @@ -68,7 +69,7 @@ std::pair> TriangulateTwoBearingsMidpointSolve( const T eps = T(1e-30); const T det = A.determinant(); - if ((det < eps) && (det > -eps)) { + if (fabs(det) < eps) { return std::make_pair(false, Eigen::Matrix()); } const auto lambdas = A.inverse() * b;