소스 검색

Fixed isOrthogonal, return false for zero matrix

tetrisplusplus 2 년 전
부모
커밋
96b1c72bfc
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      glm/gtx/matrix_query.inl

+ 2 - 2
glm/gtx/matrix_query.inl

@@ -99,14 +99,14 @@ namespace glm
 		bool result = true;
 		bool result = true;
 		for(length_t i(0); result && i < m.length() - 1; ++i)
 		for(length_t i(0); result && i < m.length() - 1; ++i)
 		for(length_t j(i + 1); result && j < m.length(); ++j)
 		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)
 		if(result)
 		{
 		{
 			mat<C, R, T, Q> tmp = transpose(m);
 			mat<C, R, T, Q> tmp = transpose(m);
 			for(length_t i(0); result && i < m.length() - 1 ; ++i)
 			for(length_t i(0); result && i < m.length() - 1 ; ++i)
 			for(length_t j(i + 1); result && j < m.length(); ++j)
 			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;
 		return result;
 	}
 	}