From 92274cf65470be8926dbd6ff3bfa264dbf8fc309 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= Date: Thu, 3 Jun 2021 19:17:53 +0200 Subject: [PATCH] Update triangulation.h Since on POWER the input of abs() is promoted to an integer, this condition always holds. This is a fix that hopefully makes it work on ppc64le. --- opensfm/src/geometry/triangulation.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opensfm/src/geometry/triangulation.h b/opensfm/src/geometry/triangulation.h index 013ad4c2a..fa4cf3632 100644 --- a/opensfm/src/geometry/triangulation.h +++ b/opensfm/src/geometry/triangulation.h @@ -68,7 +68,7 @@ std::pair> TriangulateTwoBearingsMidpointSolve( const T eps = T(1e-30); const T det = A.determinant(); - if (abs(det) < eps) { + if ((det < eps) && (det > -eps)) { return std::make_pair(false, Eigen::Matrix()); } const auto lambdas = A.inverse() * b;