{"id":8,"date":"2004-06-29T11:36:34","date_gmt":"2004-06-29T16:36:34","guid":{"rendered":"http:\/\/www.essentialmath.com\/blog\/?p=8"},"modified":"2005-07-29T20:40:36","modified_gmt":"2005-07-30T01:40:36","slug":"getting-axis-and-angle-from-rotation-matrix","status":"publish","type":"post","link":"https:\/\/www.essentialmath.com\/blog\/?p=8","title":{"rendered":"Getting Axis and Angle from Rotation Matrix"},"content":{"rendered":"<p>There is a bug in the code that gets the axis and angle information from a rotation matrix.  Where the angle is 180 degrees (the last else statement) it computes the reciprocal value incorrectly.  The original code is:<br \/>\n[cpp]<br \/>\nfloat recip = 0.5f\/s;<br \/>\n[\/cpp]<br \/>\nThe fixed code should be:<br \/>\n[cpp]<br \/>\nfloat recip = 1.0f\/s;<br \/>\n[\/cpp]<br \/>\nThis should be corrected in both IvMatrix33 and IvMatrix44.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There is a bug in the code that gets the axis and angle information from a rotation matrix. Where the angle is 180 degrees (the last else statement) it computes the reciprocal value incorrectly. The original code is: [cpp] float recip = 0.5f\/s; [\/cpp] The fixed code should be: [cpp] float recip = 1.0f\/s; [\/cpp] [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,3],"tags":[],"class_list":["post-8","post","type-post","status-publish","format-standard","hentry","category-erratical","category-mathematical"],"_links":{"self":[{"href":"https:\/\/www.essentialmath.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/8","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.essentialmath.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.essentialmath.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.essentialmath.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.essentialmath.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8"}],"version-history":[{"count":0,"href":"https:\/\/www.essentialmath.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/8\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.essentialmath.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.essentialmath.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.essentialmath.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}