From 50e9709950812c066404a00ab4221f89486758c9 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Wed, 18 Jan 2023 08:35:02 -0500 Subject: [PATCH] spelling: squared Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- includes/glm/gtx/intersect.hpp | 2 +- includes/glm/gtx/intersect.inl | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/glm/gtx/intersect.hpp b/includes/glm/gtx/intersect.hpp index 8caa17e..6cf687e 100644 --- a/includes/glm/gtx/intersect.hpp +++ b/includes/glm/gtx/intersect.hpp @@ -66,7 +66,7 @@ namespace glm template GLM_FUNC_DECL bool intersectRaySphere( genType const& rayStarting, genType const& rayNormalizedDirection, - genType const& sphereCenter, typename genType::value_type const sphereRadiusSquered, + genType const& sphereCenter, typename genType::value_type const sphereRadiusSquared, typename genType::value_type & intersectionDistance); //! Compute the intersection of a ray and a sphere. diff --git a/includes/glm/gtx/intersect.inl b/includes/glm/gtx/intersect.inl index 7035c48..3a69cde 100644 --- a/includes/glm/gtx/intersect.inl +++ b/includes/glm/gtx/intersect.inl @@ -132,7 +132,7 @@ namespace glm GLM_FUNC_QUALIFIER bool intersectRaySphere ( genType const& rayStarting, genType const& rayNormalizedDirection, - genType const& sphereCenter, const typename genType::value_type sphereRadiusSquered, + genType const& sphereCenter, const typename genType::value_type sphereRadiusSquared, typename genType::value_type & intersectionDistance ) { @@ -140,11 +140,11 @@ namespace glm genType diff = sphereCenter - rayStarting; typename genType::value_type t0 = dot(diff, rayNormalizedDirection); typename genType::value_type dSquared = dot(diff, diff) - t0 * t0; - if( dSquared > sphereRadiusSquered ) + if( dSquared > sphereRadiusSquared ) { return false; } - typename genType::value_type t1 = sqrt( sphereRadiusSquered - dSquared ); + typename genType::value_type t1 = sqrt( sphereRadiusSquared - dSquared ); intersectionDistance = t0 > t1 + Epsilon ? t0 - t1 : t0 + t1; return intersectionDistance > Epsilon; }