Skip to content

Commit

Permalink
added regularization in analytic exp
Browse files Browse the repository at this point in the history
  • Loading branch information
gravitino committed Mar 4, 2015
1 parent 873e752 commit 7ca67fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dualquat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ struct quat {

assert(w*w < EPS(value_t));

value_t dst = std::sqrt(x*x+y*y+z*z);
value_t dst = std::sqrt(x*x+y*y+z*z+EPS(value_t));
value_t fac = std::sin(dst)/dst;

return quat<value_t>(std::cos(dst), x*fac, y*fac, z*fac);
Expand Down

0 comments on commit 7ca67fb

Please sign in to comment.