Changed 1e-20 to 1e-16. 1e-20 was cutting it too close on 32-bit system, resulting in divide by zero later

release/4.3a0
Chris Beall 2014-05-14 14:08:29 -04:00 committed by cbeall3
parent 5b717c801f
commit e1c0ad8335
1 changed files with 2 additions and 2 deletions

View File

@ -151,9 +151,9 @@ Vector Unit3::localCoordinates(const Unit3& y) const {
double dot = p.dot(q);
// Check for special cases
if (std::abs(dot - 1.0) < 1e-20)
if (std::abs(dot - 1.0) < 1e-16)
return (Vector(2) << 0, 0);
else if (std::abs(dot + 1.0) < 1e-20)
else if (std::abs(dot + 1.0) < 1e-16)
return (Vector(2) << M_PI, 0);
else {
// no special case