<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>CPPLapack: dcovector_small-specialized.hpp Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">CPPLapack
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Friends</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="dir_a37d0dd275f7ec49ee26f1d33d1059f5.html">include</a>      </li>
      <li class="navelem"><a class="el" href="dir_cb17ad2bab547ae9db055464c7b276b8.html">small</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">dcovector_small-specialized.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="dcovector__small-specialized_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00002"></a>00002 <span class="comment">/*! calculate vector product only for 2D vector */</span>
<a name="l00003"></a><a class="code" href="dcovector__small_8hpp.html#a230a650fe8b2ab9401d09a095db42001">00003</a> <span class="keyword">inline</span> <span class="keywordtype">double</span> <a class="code" href="__dcovector-double_8hpp.html#ad43cb230f984895bc93f23ae7a13568f">operator/</a>(<span class="keyword">const</span> dcovec2&amp; A, <span class="keyword">const</span> dcovec2&amp; B)
<a name="l00004"></a>00004 {VERBOSE_REPORT;
<a name="l00005"></a>00005   <span class="keywordflow">return</span> A(0)*B(1) -A(1)*B(0);
<a name="l00006"></a>00006 }
<a name="l00007"></a>00007 
<a name="l00008"></a>00008 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00009"></a>00009 <span class="comment">/*!  */</span>
<a name="l00010"></a><a class="code" href="dcovector__small-specialized_8hpp.html#aa6f97bbb63b89a3be367622faa03161a">00010</a> <span class="keyword">inline</span> <span class="keywordtype">double</span> <a class="code" href="dcovector__small-specialized_8hpp.html#aa6f97bbb63b89a3be367622faa03161a">v2t</a>(<span class="keyword">const</span> dcovec2&amp; v)
<a name="l00011"></a>00011 {VERBOSE_REPORT;
<a name="l00012"></a>00012   <span class="keywordflow">return</span> atan2(v(1),v(0));
<a name="l00013"></a>00013 }
<a name="l00014"></a>00014 
<a name="l00015"></a>00015 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00016"></a>00016 <span class="comment">/*!  */</span>
<a name="l00017"></a><a class="code" href="dcovector__small_8hpp.html#ad5ccc59159c9504c21e2af2ff45f86ef">00017</a> <span class="keyword">inline</span> dcovec2 <a class="code" href="dcovector__small-specialized_8hpp.html#a7c6e40d311633e4c71f998cf49ff39f0">rotate</a>(<span class="keyword">const</span> dcovec2&amp; v, <span class="keyword">const</span> <span class="keywordtype">double</span>&amp; <a class="code" href="__dcovector-calc_8hpp.html#afe5475fdf72e825c1fea5f306d686664">t</a>)
<a name="l00018"></a>00018 {VERBOSE_REPORT;
<a name="l00019"></a>00019   dcovec2 w;
<a name="l00020"></a>00020   w(0)=v(0)*cos(t)-v(1)*sin(t);
<a name="l00021"></a>00021   w(1)=v(0)*sin(t)+v(1)*cos(t);
<a name="l00022"></a>00022   <span class="keywordflow">return</span> w;
<a name="l00023"></a>00023 }
<a name="l00024"></a>00024 <span class="comment"></span>
<a name="l00025"></a>00025 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00026"></a>00026 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00027"></a>00027 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00028"></a>00028 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00029"></a>00029 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00030"></a>00030 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00031"></a>00031 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00032"></a>00032 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00033"></a>00033 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00034"></a>00034 <span class="comment"></span>
<a name="l00035"></a>00035 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00036"></a>00036 <span class="comment">/*! calculate vector product only for 3D vector */</span>
<a name="l00037"></a><a class="code" href="dcovector__small_8hpp.html#a85a429658a94fd5fd3d79fc25254326e">00037</a> <span class="keyword">inline</span> dcovec3 <a class="code" href="__dcovector-double_8hpp.html#ad43cb230f984895bc93f23ae7a13568f">operator/</a>(<span class="keyword">const</span> dcovec3&amp; A, <span class="keyword">const</span> dcovec3&amp; B)
<a name="l00038"></a>00038 {VERBOSE_REPORT;
<a name="l00039"></a>00039   dcovec3 C;
<a name="l00040"></a>00040   C(0) =A(1)*B(2) -A(2)*B(1);
<a name="l00041"></a>00041   C(1) =A(2)*B(0) -A(0)*B(2);
<a name="l00042"></a>00042   C(2) =A(0)*B(1) -A(1)*B(0);
<a name="l00043"></a>00043   <span class="keywordflow">return</span> C;
<a name="l00044"></a>00044 }
<a name="l00045"></a>00045 
<a name="l00046"></a>00046 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00047"></a>00047 <span class="comment">/*! calculate vector product only for 3D vector */</span>
<a name="l00048"></a><a class="code" href="dcovector__small_8hpp.html#acf67466bfef74dd3ef429262a490d678">00048</a> <span class="keyword">inline</span> dcovec3 <a class="code" href="dcovector__small-functions_8hpp.html#a7df09cf25dce94312b97d179517c5f61">operator/=</a>(dcovec3&amp; A, <span class="keyword">const</span> dcovec3&amp; B)
<a name="l00049"></a>00049 {VERBOSE_REPORT;
<a name="l00050"></a>00050   A =A/B;
<a name="l00051"></a>00051   <span class="keywordflow">return</span> A;
<a name="l00052"></a>00052 }
<a name="l00053"></a>00053 
<a name="l00054"></a>00054 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00055"></a>00055 <span class="comment">/*!  */</span>
<a name="l00056"></a><a class="code" href="dcovector__small_8hpp.html#a51e6874f8a71597bc380f5f28f60973d">00056</a> <span class="keyword">inline</span> dquater <a class="code" href="dcovector__small-specialized_8hpp.html#a98570caae6b2317527786768626ef2b4">vr2q</a>(<span class="keyword">const</span> dcovec3&amp; v, <span class="keyword">const</span> <span class="keywordtype">double</span>&amp; r)
<a name="l00057"></a>00057 {VERBOSE_REPORT;
<a name="l00058"></a>00058   <span class="keywordflow">return</span> dquater(v(0),v(1),v(2),r);
<a name="l00059"></a>00059 }
<a name="l00060"></a>00060 
<a name="l00061"></a>00061 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00062"></a>00062 <span class="comment">/*!  */</span>
<a name="l00063"></a><a class="code" href="dcovector__small_8hpp.html#aab227c7411a101f976b2f85ea3745ef0">00063</a> <span class="keyword">inline</span> dquater <a class="code" href="dcovector__small-specialized_8hpp.html#a2ea0dbdf9f1b8de71470bf9d0a356577">vt2q</a>(<span class="keyword">const</span> dcovec3&amp; v, <span class="keyword">const</span> <span class="keywordtype">double</span>&amp; theta)
<a name="l00064"></a>00064 {VERBOSE_REPORT;
<a name="l00065"></a>00065   <span class="keywordflow">return</span> <a class="code" href="dcovector__small-specialized_8hpp.html#a98570caae6b2317527786768626ef2b4">vr2q</a>( v/(<a class="code" href="__dcovector-calc_8hpp.html#a892d328603828a5d0a2acedc2c4db7bb">nrm2</a>(v)+DBL_MIN)*std::sin(0.5*theta), std::cos(0.5*theta) );
<a name="l00066"></a>00066 }
<a name="l00067"></a>00067 
<a name="l00068"></a>00068 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00069"></a>00069 <span class="comment">/*!  */</span>
<a name="l00070"></a><a class="code" href="dcovector__small_8hpp.html#ad523d455ff81d70112c7203aef787e52">00070</a> <span class="keyword">inline</span> dcovec3 <a class="code" href="dcovector__small-specialized_8hpp.html#a7c6e40d311633e4c71f998cf49ff39f0">rotate</a>(<span class="keyword">const</span> dcovec3&amp; v, <span class="keyword">const</span> dquater&amp; q)
<a name="l00071"></a>00071 {VERBOSE_REPORT;
<a name="l00072"></a>00072   <span class="keywordflow">return</span> <a class="code" href="dcovector__small-specialized_8hpp.html#a2eb38711e1c30cc070f53589d1905fea">imag</a>( q*<a class="code" href="dcovector__small-specialized_8hpp.html#a98570caae6b2317527786768626ef2b4">vr2q</a>(v,0.)*<a class="code" href="__zcovector-calc_8hpp.html#a773c28a661407104353f70c7a3ab88f2">conj</a>(q) );
<a name="l00073"></a>00073 }
<a name="l00074"></a>00074 <span class="comment"></span>
<a name="l00075"></a>00075 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00076"></a>00076 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00077"></a>00077 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00078"></a>00078 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00079"></a>00079 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00080"></a>00080 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00081"></a>00081 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00082"></a>00082 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00083"></a>00083 <span class="comment">///////////////////////////////////////////////////////////////////////////////</span>
<a name="l00084"></a>00084 <span class="comment"></span>
<a name="l00085"></a>00085 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00086"></a>00086 <span class="comment">/*! conjuction */</span>
<a name="l00087"></a><a class="code" href="dcovector__small_8hpp.html#ad038652122d7371519c0741f583f2236">00087</a> <span class="keyword">inline</span> dquater <a class="code" href="__zcovector-calc_8hpp.html#a773c28a661407104353f70c7a3ab88f2">conj</a>(<span class="keyword">const</span> dquater&amp; q)
<a name="l00088"></a>00088 {VERBOSE_REPORT;
<a name="l00089"></a>00089   <span class="keywordflow">return</span> dquater(-q(0),-q(1),-q(2), q(3));
<a name="l00090"></a>00090 }
<a name="l00091"></a>00091 
<a name="l00092"></a>00092 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00093"></a>00093 <span class="comment">/*! imag */</span>
<a name="l00094"></a><a class="code" href="dcovector__small_8hpp.html#a5e2ba22eeeb1ef186923fc1bdc7d4819">00094</a> <span class="keyword">inline</span> dcovec3 <a class="code" href="dcovector__small-specialized_8hpp.html#a2eb38711e1c30cc070f53589d1905fea">imag</a>(<span class="keyword">const</span> dquater&amp; q)
<a name="l00095"></a>00095 {VERBOSE_REPORT;
<a name="l00096"></a>00096   <span class="keywordflow">return</span> dcovec3(q(0),q(1),q(2));
<a name="l00097"></a>00097 }
<a name="l00098"></a>00098 
<a name="l00099"></a>00099 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00100"></a>00100 <span class="comment">/*! inverse */</span>
<a name="l00101"></a><a class="code" href="dcovector__small_8hpp.html#a6c73eeec0f2713a2519d0650d19cb2bc">00101</a> <span class="keyword">inline</span> dquater <a class="code" href="dcovector__small-specialized_8hpp.html#a816188231dc59c47c02a0187291207f1">inv</a>(<span class="keyword">const</span> dquater&amp; q)
<a name="l00102"></a>00102 {VERBOSE_REPORT;
<a name="l00103"></a>00103   <span class="keywordflow">return</span> <a class="code" href="__zcovector-calc_8hpp.html#a773c28a661407104353f70c7a3ab88f2">conj</a>(q)/pow(<a class="code" href="__dcovector-calc_8hpp.html#a892d328603828a5d0a2acedc2c4db7bb">nrm2</a>(q),2);
<a name="l00104"></a>00104 }
<a name="l00105"></a>00105 
<a name="l00106"></a>00106 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00107"></a>00107 <span class="comment">/*!  */</span>
<a name="l00108"></a><a class="code" href="dcovector__small_8hpp.html#a3323486dd3ad3261a8ad4b89f79d21d2">00108</a> <span class="keyword">inline</span> dquater <a class="code" href="__dcovector-__drovector_8hpp.html#a36e102e1f8cddbe23f35d1e8dc37e2a7">operator*</a>(<span class="keyword">const</span> dquater&amp; q1, <span class="keyword">const</span> dquater&amp; q2)
<a name="l00109"></a>00109 {VERBOSE_REPORT;
<a name="l00110"></a>00110   <span class="keywordflow">return</span> dquater(q1(3)*q2(0) +q1(0)*q2(3) +q1(1)*q2(2) -q1(2)*q2(1),
<a name="l00111"></a>00111                  q1(3)*q2(1) -q1(0)*q2(2) +q1(1)*q2(3) +q1(2)*q2(0),
<a name="l00112"></a>00112                  q1(3)*q2(2) +q1(0)*q2(1) -q1(1)*q2(0) +q1(2)*q2(3),
<a name="l00113"></a>00113                  q1(3)*q2(3) -q1(0)*q2(0) -q1(1)*q2(1) -q1(2)*q2(2) );
<a name="l00114"></a>00114 }
<a name="l00115"></a>00115 
<a name="l00116"></a>00116 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00117"></a>00117 <span class="comment">/*!  */</span>
<a name="l00118"></a><a class="code" href="dcovector__small_8hpp.html#a185df59b62f9c4cdf616a1421c73e328">00118</a> <span class="keyword">inline</span> dquater <a class="code" href="__dcovector-double_8hpp.html#ad43cb230f984895bc93f23ae7a13568f">operator/</a>(<span class="keyword">const</span> dquater&amp; q1, <span class="keyword">const</span> dquater&amp; q2)
<a name="l00119"></a>00119 {VERBOSE_REPORT;
<a name="l00120"></a>00120   <span class="keywordflow">return</span> q1*<a class="code" href="dcovector__small-specialized_8hpp.html#a816188231dc59c47c02a0187291207f1">inv</a>(q2);
<a name="l00121"></a>00121 }
<a name="l00122"></a>00122 
<a name="l00123"></a>00123 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00124"></a>00124 <span class="comment">/*!  */</span>
<a name="l00125"></a><a class="code" href="dcovector__small_8hpp.html#a5f0b0259b11b36d02dbda8de34f9d759">00125</a> <span class="keyword">inline</span> dquater <a class="code" href="dcovector__small-functions_8hpp.html#ac8fbaf7eb4758e7f12bea50027ffd3d7">operator*=</a>(dquater&amp; q1, <span class="keyword">const</span> dquater&amp; q2)
<a name="l00126"></a>00126 {VERBOSE_REPORT;
<a name="l00127"></a>00127   q1 =q1*q2;
<a name="l00128"></a>00128   <span class="keywordflow">return</span> q1;
<a name="l00129"></a>00129 }
<a name="l00130"></a>00130 
<a name="l00131"></a>00131 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00132"></a>00132 <span class="comment">/*!  */</span>
<a name="l00133"></a><a class="code" href="dcovector__small_8hpp.html#ab5b499b728cb28fc819d52c62e19ff16">00133</a> <span class="keyword">inline</span> dquater <a class="code" href="dcovector__small-functions_8hpp.html#a7df09cf25dce94312b97d179517c5f61">operator/=</a>(dquater&amp; q1, <span class="keyword">const</span> dquater&amp; q2)
<a name="l00134"></a>00134 {VERBOSE_REPORT;
<a name="l00135"></a>00135   q1 =q1/q2;
<a name="l00136"></a>00136   <span class="keywordflow">return</span> q1;
<a name="l00137"></a>00137 }
<a name="l00138"></a>00138 
<a name="l00139"></a>00139 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00140"></a>00140 <span class="comment">/*! return vector from quaternion (|vector|=theta) */</span>
<a name="l00141"></a><a class="code" href="dcovector__small_8hpp.html#a19e24689c6ca7082f09baf9f9ea84f20">00141</a> <span class="keyword">inline</span> dcovec3 <a class="code" href="dcovector__small-specialized_8hpp.html#abe7b42c5233b03e0d0d8dcc0ce5c6b14">q2vt</a>(<span class="keyword">const</span> dquater&amp; q)
<a name="l00142"></a>00142 {VERBOSE_REPORT;
<a name="l00143"></a>00143   <span class="keywordtype">double</span> sin_theta_half;
<a name="l00144"></a>00144   <span class="keywordtype">double</span> theta( 2.*std::acos(q(3)) );
<a name="l00145"></a>00145   
<a name="l00146"></a>00146   <span class="keywordflow">if</span>(theta&lt;M_PI){
<a name="l00147"></a>00147     sin_theta_half =std::sin(0.5*theta);
<a name="l00148"></a>00148   }
<a name="l00149"></a>00149   <span class="keywordflow">else</span>{
<a name="l00150"></a>00150     theta -=2.*M_PI;
<a name="l00151"></a>00151     sin_theta_half =-std::sin(0.5*theta);
<a name="l00152"></a>00152   }
<a name="l00153"></a>00153   
<a name="l00154"></a>00154   <span class="keywordflow">return</span> dcovec3( theta*q(0)/sin_theta_half,
<a name="l00155"></a>00155                   theta*q(1)/sin_theta_half,
<a name="l00156"></a>00156                   theta*q(2)/sin_theta_half );
<a name="l00157"></a>00157 }
<a name="l00158"></a>00158 
<a name="l00159"></a>00159 <span class="comment">//=============================================================================</span><span class="comment"></span>
<a name="l00160"></a>00160 <span class="comment">/*! return rotational matrix made of quaternion */</span>
<a name="l00161"></a><a class="code" href="dcovector__small_8hpp.html#a6882d85bea616d0bbf1f1d970a2d8531">00161</a> <span class="keyword">inline</span> dgemat3 <a class="code" href="dcovector__small-specialized_8hpp.html#a0b8662d50893bcd25e2d80f468b721f5">q2m</a>(<span class="keyword">const</span> dquater&amp; q)
<a name="l00162"></a>00162 {VERBOSE_REPORT;
<a name="l00163"></a>00163   dquater cq( <a class="code" href="__zcovector-calc_8hpp.html#a773c28a661407104353f70c7a3ab88f2">conj</a>(q) );
<a name="l00164"></a>00164   dquater X( dquater(+q(3),+q(2),-q(1),-q(0))*cq );
<a name="l00165"></a>00165   dquater Y( dquater(-q(2),+q(3),+q(0),-q(1))*cq );
<a name="l00166"></a>00166   dquater Z( dquater(+q(1),-q(0),+q(3),-q(2))*cq );
<a name="l00167"></a>00167   dgemat3 mat;
<a name="l00168"></a>00168   mat(0,0)=X(0); mat(0,1)=Y(0); mat(0,2)=Z(0);
<a name="l00169"></a>00169   mat(1,0)=X(1); mat(1,1)=Y(1); mat(1,2)=Z(1);
<a name="l00170"></a>00170   mat(2,0)=X(2); mat(2,1)=Y(2); mat(2,2)=Z(2);
<a name="l00171"></a>00171   <span class="keywordflow">return</span> mat;
<a name="l00172"></a>00172 }
</pre></div></div><!-- contents -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Friends</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
