Browse Source

Math: use Vector::max() instead of custom ugly solution.

pull/59/head
Vladimír Vondruš 12 years ago
parent
commit
71db38cb2f
  1. 5
      src/Magnum/Math/Quaternion.h

5
src/Magnum/Math/Quaternion.h

@ -488,10 +488,7 @@ template<class T> Quaternion<T> quaternionFromMatrix(const Matrix<3, T>& m) {
}
/* Diagonal is negative */
std::size_t i = 0;
if(diagonal[1] > diagonal[0]) i = 1;
if(diagonal[2] > diagonal[i]) i = 2;
const std::size_t i = diagonal.max();
const std::size_t j = (i + 1) % 3;
const std::size_t k = (i + 2) % 3;

Loading…
Cancel
Save