diff --git a/doc/api/a00044.html b/doc/api/a00044.html
index 393a1c87..86892f43 100644
--- a/doc/api/a00044.html
+++ b/doc/api/a00044.html
@@ -111,7 +111,7 @@ Functions
| Compute the intersection of a ray and a plane. More...
|
|
template<typename genType > |
-GLM_FUNC_DECL bool | intersectRaySphere (genType const &rayStarting, genType const &rayNormalizedDirection, genType const &sphereCenter, typename genType::value_type const sphereRadiusSquered, typename genType::value_type &intersectionDistance) |
+GLM_FUNC_DECL bool | intersectRaySphere (genType const &rayStarting, genType const &rayNormalizedDirection, genType const &sphereCenter, typename genType::value_type const sphereRadiusSquared, typename genType::value_type &intersectionDistance) |
| Compute the intersection distance of a ray and a sphere. More...
|
|
template<typename genType > |
diff --git a/doc/api/a00044_source.html b/doc/api/a00044_source.html
index dd4a4fdc..f1134827 100644
--- a/doc/api/a00044_source.html
+++ b/doc/api/a00044_source.html
@@ -131,7 +131,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
66 template<
typename genType>
68 genType
const& rayStarting, genType
const& rayNormalizedDirection,
- 69 genType
const& sphereCenter,
typename genType::value_type
const sphereRadiusSquered,
+ 69 genType
const& sphereCenter,
typename genType::value_type
const sphereRadiusSquared,
70 typename genType::value_type & intersectionDistance);
74 template<
typename genType>
diff --git a/doc/api/a00331.html b/doc/api/a00331.html
index 07aeaf8d..83539eea 100644
--- a/doc/api/a00331.html
+++ b/doc/api/a00331.html
@@ -100,7 +100,7 @@ Functions
| Compute the intersection of a ray and a plane. More...
|
|
template<typename genType > |
-GLM_FUNC_DECL bool | intersectRaySphere (genType const &rayStarting, genType const &rayNormalizedDirection, genType const &sphereCenter, typename genType::value_type const sphereRadiusSquered, typename genType::value_type &intersectionDistance) |
+GLM_FUNC_DECL bool | intersectRaySphere (genType const &rayStarting, genType const &rayNormalizedDirection, genType const &sphereCenter, typename genType::value_type const sphereRadiusSquared, typename genType::value_type &intersectionDistance) |
| Compute the intersection distance of a ray and a sphere. More...
|
|
template<typename genType > |
@@ -307,7 +307,7 @@ Functions
|
|
typename genType::value_type const |
- sphereRadiusSquered, |
+ sphereRadiusSquared, |
|
diff --git a/doc/api/search/all_8.js b/doc/api/search/all_8.js
index 67374723..1890ed9e 100644
--- a/doc/api/search/all_8.js
+++ b/doc/api/search/all_8.js
@@ -68,7 +68,7 @@ var searchData=
['intersectlinesphere',['intersectLineSphere',['../a00331.html#ga9c68139f3d8a4f3d7fe45f9dbc0de5b7',1,'glm']]],
['intersectlinetriangle',['intersectLineTriangle',['../a00331.html#ga9d29b9b3acb504d43986502f42740df4',1,'glm']]],
['intersectrayplane',['intersectRayPlane',['../a00331.html#gad3697a9700ea379739a667ea02573488',1,'glm']]],
- ['intersectraysphere',['intersectRaySphere',['../a00331.html#gac88f8cd84c4bcb5b947d56acbbcfa56e',1,'glm::intersectRaySphere(genType const &rayStarting, genType const &rayNormalizedDirection, genType const &sphereCenter, typename genType::value_type const sphereRadiusSquered, typename genType::value_type &intersectionDistance)'],['../a00331.html#gad28c00515b823b579c608aafa1100c1d',1,'glm::intersectRaySphere(genType const &rayStarting, genType const &rayNormalizedDirection, genType const &sphereCenter, const typename genType::value_type sphereRadius, genType &intersectionPosition, genType &intersectionNormal)']]],
+ ['intersectraysphere',['intersectRaySphere',['../a00331.html#gac88f8cd84c4bcb5b947d56acbbcfa56e',1,'glm::intersectRaySphere(genType const &rayStarting, genType const &rayNormalizedDirection, genType const &sphereCenter, typename genType::value_type const sphereRadiusSquared, typename genType::value_type &intersectionDistance)'],['../a00331.html#gad28c00515b823b579c608aafa1100c1d',1,'glm::intersectRaySphere(genType const &rayStarting, genType const &rayNormalizedDirection, genType const &sphereCenter, const typename genType::value_type sphereRadius, genType &intersectionPosition, genType &intersectionNormal)']]],
['intersectraytriangle',['intersectRayTriangle',['../a00331.html#ga65bf2c594482f04881c36bc761f9e946',1,'glm']]],
['inverse',['inverse',['../a00248.html#gab41da854ae678e23e114b598cbca4065',1,'glm::inverse(qua< T, Q > const &q)'],['../a00317.html#ga070f521a953f6461af4ab4cf8ccbf27e',1,'glm::inverse(tdualquat< T, Q > const &q)'],['../a00371.html#gaed509fe8129b01e4f20a6d0de5690091',1,'glm::inverse(mat< C, R, T, Q > const &m)']]],
['inversesqrt',['inversesqrt',['../a00242.html#ga523dd6bd0ad9f75ae2d24c8e4b017b7a',1,'glm']]],
diff --git a/doc/api/search/functions_8.js b/doc/api/search/functions_8.js
index fcf43b87..663b9dc9 100644
--- a/doc/api/search/functions_8.js
+++ b/doc/api/search/functions_8.js
@@ -11,7 +11,7 @@ var searchData=
['intersectlinesphere',['intersectLineSphere',['../a00331.html#ga9c68139f3d8a4f3d7fe45f9dbc0de5b7',1,'glm']]],
['intersectlinetriangle',['intersectLineTriangle',['../a00331.html#ga9d29b9b3acb504d43986502f42740df4',1,'glm']]],
['intersectrayplane',['intersectRayPlane',['../a00331.html#gad3697a9700ea379739a667ea02573488',1,'glm']]],
- ['intersectraysphere',['intersectRaySphere',['../a00331.html#gac88f8cd84c4bcb5b947d56acbbcfa56e',1,'glm::intersectRaySphere(genType const &rayStarting, genType const &rayNormalizedDirection, genType const &sphereCenter, typename genType::value_type const sphereRadiusSquered, typename genType::value_type &intersectionDistance)'],['../a00331.html#gad28c00515b823b579c608aafa1100c1d',1,'glm::intersectRaySphere(genType const &rayStarting, genType const &rayNormalizedDirection, genType const &sphereCenter, const typename genType::value_type sphereRadius, genType &intersectionPosition, genType &intersectionNormal)']]],
+ ['intersectraysphere',['intersectRaySphere',['../a00331.html#gac88f8cd84c4bcb5b947d56acbbcfa56e',1,'glm::intersectRaySphere(genType const &rayStarting, genType const &rayNormalizedDirection, genType const &sphereCenter, typename genType::value_type const sphereRadiusSquared, typename genType::value_type &intersectionDistance)'],['../a00331.html#gad28c00515b823b579c608aafa1100c1d',1,'glm::intersectRaySphere(genType const &rayStarting, genType const &rayNormalizedDirection, genType const &sphereCenter, const typename genType::value_type sphereRadius, genType &intersectionPosition, genType &intersectionNormal)']]],
['intersectraytriangle',['intersectRayTriangle',['../a00331.html#ga65bf2c594482f04881c36bc761f9e946',1,'glm']]],
['inverse',['inverse',['../a00248.html#gab41da854ae678e23e114b598cbca4065',1,'glm::inverse(qua< T, Q > const &q)'],['../a00317.html#ga070f521a953f6461af4ab4cf8ccbf27e',1,'glm::inverse(tdualquat< T, Q > const &q)'],['../a00371.html#gaed509fe8129b01e4f20a6d0de5690091',1,'glm::inverse(mat< C, R, T, Q > const &m)']]],
['inversesqrt',['inversesqrt',['../a00242.html#ga523dd6bd0ad9f75ae2d24c8e4b017b7a',1,'glm']]],
diff --git a/glm/gtx/intersect.hpp b/glm/gtx/intersect.hpp
index 3c78f2b8..f5c0621d 100644
--- a/glm/gtx/intersect.hpp
+++ b/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/glm/gtx/intersect.inl b/glm/gtx/intersect.inl
index 95e81e8b..d242a61a 100644
--- a/glm/gtx/intersect.inl
+++ b/glm/gtx/intersect.inl
@@ -135,7 +135,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
)
{
@@ -143,11 +143,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;
}