From 477ba6934370188b104937d6af60fe29173e3f9a Mon Sep 17 00:00:00 2001 From: tetrisplusplus Date: Mon, 23 Jan 2023 21:27:02 +0900 Subject: [PATCH] Fixed isOrthogonal, return false for zero matrix --- glm/gtx/matrix_query.inl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glm/gtx/matrix_query.inl b/glm/gtx/matrix_query.inl index b763c1ab..ab7bf943 100644 --- a/glm/gtx/matrix_query.inl +++ b/glm/gtx/matrix_query.inl @@ -99,14 +99,14 @@ namespace glm bool result = true; for(length_t i(0); result && i < m.length() - 1; ++i) for(length_t j(i + 1); result && j < m.length(); ++j) - result = areOrthogonal(m[i], m[j], epsilon); + result = areOrthonormal(m[i], m[j], epsilon); if(result) { mat tmp = transpose(m); for(length_t i(0); result && i < m.length() - 1 ; ++i) for(length_t j(i + 1); result && j < m.length(); ++j) - result = areOrthogonal(tmp[i], tmp[j], epsilon); + result = areOrthonormal(tmp[i], tmp[j], epsilon); } return result; }