CPPLapack
 All Classes Files Functions Variables Friends Pages
drovector_small-specialized.hpp
Go to the documentation of this file.
1 //=============================================================================
2 /*! calculate vector product for 2D vector */
3 inline double operator/(const drovec2& A, const drovec2& B)
4 {CPPL_VERBOSE_REPORT;
5  return A(0)*B(1)-A(1)*B(0);
6 }
7 
8 ///////////////////////////////////////////////////////////////////////////////
9 ///////////////////////////////////////////////////////////////////////////////
10 ///////////////////////////////////////////////////////////////////////////////
11 ///////////////////////////////////////////////////////////////////////////////
12 ///////////////////////////////////////////////////////////////////////////////
13 ///////////////////////////////////////////////////////////////////////////////
14 
15 //=============================================================================
16 /*! calculate vector product only for 3D vector */
17 inline drovec3 operator/(const drovec3& A, const drovec3& B)
18 {CPPL_VERBOSE_REPORT;
19  drovec3 C;
20  C(0) =A(1)*B(2) -A(2)*B(1);
21  C(1) =A(2)*B(0) -A(0)*B(2);
22  C(2) =A(0)*B(1) -A(1)*B(0);
23  return C;
24 }
double operator/(const drovec2 &A, const drovec2 &B)