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