From 01ac9e9b33a0ede68982a3f133c7d52916682f4c Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sat, 11 Jan 2014 23:21:54 +0100 Subject: [PATCH] Fixed build --- glm/detail/type_mat2x2.inl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/glm/detail/type_mat2x2.inl b/glm/detail/type_mat2x2.inl index 7919a251..feed336a 100644 --- a/glm/detail/type_mat2x2.inl +++ b/glm/detail/type_mat2x2.inl @@ -398,13 +398,15 @@ namespace detail { GLM_FUNC_QUALIFIER static detail::tmat2x2 call(detail::tmat2x2 const & m) { - T Determinant = determinant(m); + T OneOverDeterminant = static_cast<>(1) / ( + + m[0][0] * m[1][1] + - m[1][0] * m[0][1]); detail::tmat2x2 Inverse( - + m[1][1] / Determinant, - - m[0][1] / Determinant, - - m[1][0] / Determinant, - + m[0][0] / Determinant); + + m[1][1] * OneOverDeterminant, + - m[0][1] * OneOverDeterminant, + - m[1][0] * OneOverDeterminant, + + m[0][0] * OneOverDeterminant); return Inverse; }