Skip to content
Permalink
Browse files

checking angle for nan

  • Loading branch information...
RubioJr9 committed Oct 4, 2019
1 parent 90176cd commit 275efdfb53b64e9ab84da99f7d9357c491853f79
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/Externals/spire/arc-ball/ArcBall.cpp
@@ -84,7 +84,7 @@ glm::quat ArcBall::quatFromUnitSphere(const glm::vec3& from, const glm::vec3& to

float angle = std::acos(glm::dot(from, to));

if(angle <= 0.00001)
if(angle <= 0.00001 || std::isnan(angle))
return glm::quat(1.0, 0.0, 0.0, 0.0);

return glm::angleAxis(angle, axis);

0 comments on commit 275efdf

Please sign in to comment.
You can’t perform that action at this time.