From 8b838bdc4552bc549b416be26125fc7a54efda22 Mon Sep 17 00:00:00 2001 From: Thomas Fischer <thomas.fischer@ufz.de> Date: Sat, 19 Dec 2020 08:25:09 +0100 Subject: [PATCH] [MaL] Use dot-product instead of transpose. --- MathLib/MathTools.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/MathLib/MathTools.cpp b/MathLib/MathTools.cpp index 5d7017408e0..996c04d316c 100644 --- a/MathLib/MathTools.cpp +++ b/MathLib/MathTools.cpp @@ -49,8 +49,7 @@ double getAngle(Point3d const& p0, Point3d const& p1, Point3d const& p2) Eigen::Vector3d const v1 = c - b; // apply Cauchy Schwarz inequality - return std::acos( - (v0.transpose() * v1 / (v0.norm() * v1.norm()))(0, 0)); + return std::acos(v0.dot(v1) / (v0.norm() * v1.norm())); } double scalarTriple(Eigen::Vector3d const& u, Eigen::Vector3d const& v, -- GitLab