Commit 00842b01 authored by Mike Kremer's avatar Mike Kremer
Browse files

Perform is nan check before multiplication.

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@13036 383ad7c9-94d9-4d36-a494-682f7c89f535
parent b797c734
......@@ -827,13 +827,13 @@ rotationOfTwoVectors( const VectorT<Scalar,3>& _v0,
// Get rotation angle (in radiant)
_angle = acos(v0 | v1);
// Convert to degree
_angle *= 180 / M_PI;
// Is nan?
if (_angle != _angle)
_angle = 0.0;
// Convert to degree
_angle *= 180 / M_PI;
// Get orientation of right-handed coordinates system
// to determine whether we rotated clockwise
// or counter-clockwise (w.r.t. rotation axis)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment