Fixed intersectRayPlane returns true in parallel case #578

This commit is contained in:
Christophe Riccio 2016-11-24 01:27:17 +01:00
parent ff0b1674f4
commit ef4425a61d
2 changed files with 2 additions and 1 deletions

View File

@ -14,7 +14,7 @@ namespace glm
typename genType::value_type d = glm::dot(dir, planeNormal); typename genType::value_type d = glm::dot(dir, planeNormal);
typename genType::value_type Epsilon = std::numeric_limits<typename genType::value_type>::epsilon(); typename genType::value_type Epsilon = std::numeric_limits<typename genType::value_type>::epsilon();
if(d < Epsilon) if(d < -Epsilon)
{ {
intersectionDistance = glm::dot(planeOrig - orig, planeNormal) / d; intersectionDistance = glm::dot(planeOrig - orig, planeNormal) / d;
return true; return true;

View File

@ -55,6 +55,7 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate)
##### Fixes: ##### Fixes:
- Fixed GTC_packing test failing on GCC x86 due to denorms #212 #577 - Fixed GTC_packing test failing on GCC x86 due to denorms #212 #577
- Fixed POPCNT optimization build in Clang #512 - Fixed POPCNT optimization build in Clang #512
- Fixed intersectRayPlane returns true in parallel case #578
#### [GLM 0.9.8.3](https://github.com/g-truc/glm/releases/tag/0.9.8.3) - 2016-11-12 #### [GLM 0.9.8.3](https://github.com/g-truc/glm/releases/tag/0.9.8.3) - 2016-11-12
##### Improvements: ##### Improvements: