From b2d7f4ecc7d15882e0c1c260c20c0a811c66cd1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 8 May 2015 12:11:52 +0200 Subject: [PATCH] Revert "Math: use Vector::max() instead of custom ugly solution." This reverts commit 71db38cb2ff4b8e2fcd1d3877aed580cf7a4e846. The test passes again. --- src/Magnum/Math/Quaternion.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Magnum/Math/Quaternion.h b/src/Magnum/Math/Quaternion.h index 3f1e1809a..838e6ecdd 100644 --- a/src/Magnum/Math/Quaternion.h +++ b/src/Magnum/Math/Quaternion.h @@ -543,7 +543,10 @@ template Quaternion quaternionFromMatrix(const Matrix3x3& m) { } /* Diagonal is negative */ - const std::size_t i = diagonal.max(); + std::size_t i = 0; + if(diagonal[1] > diagonal[0]) i = 1; + if(diagonal[2] > diagonal[i]) i = 2; + const std::size_t j = (i + 1) % 3; const std::size_t k = (i + 2) % 3;