From 6f67371bb1b46579ae837d0e0c61ac1b291be743 Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Sat, 13 Jan 2018 07:51:33 +0500 Subject: Directory renamed --- external/include/glm/gtx/orthonormalize.inl | 30 +++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 external/include/glm/gtx/orthonormalize.inl (limited to 'external/include/glm/gtx/orthonormalize.inl') diff --git a/external/include/glm/gtx/orthonormalize.inl b/external/include/glm/gtx/orthonormalize.inl new file mode 100644 index 0000000..4796384 --- /dev/null +++ b/external/include/glm/gtx/orthonormalize.inl @@ -0,0 +1,30 @@ +/// @ref gtx_orthonormalize +/// @file glm/gtx/orthonormalize.inl + +namespace glm +{ + template + GLM_FUNC_QUALIFIER tmat3x3 orthonormalize(tmat3x3 const & m) + { + tmat3x3 r = m; + + r[0] = normalize(r[0]); + + T d0 = dot(r[0], r[1]); + r[1] -= r[0] * d0; + r[1] = normalize(r[1]); + + T d1 = dot(r[1], r[2]); + d0 = dot(r[0], r[2]); + r[2] -= r[0] * d0 + r[1] * d1; + r[2] = normalize(r[2]); + + return r; + } + + template + GLM_FUNC_QUALIFIER tvec3 orthonormalize(tvec3 const & x, tvec3 const & y) + { + return normalize(x - y * dot(y, x)); + } +}//namespace glm -- cgit v1.2.3