CPPLapack
 All Classes Files Functions Variables Friends Pages
zrovector_small-specialized.hpp
Go to the documentation of this file.
1 //=============================================================================
2 /*! calculate vector product for 2D vector */
3 inline comple operator/(const zrovec2& A, const zrovec2& 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 zrovec3 operator/(const zrovec3& A, const zrovec3& B)
15 {CPPL_VERBOSE_REPORT;
16  zrovec3 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 }
comple operator/(const zrovec2 &A, const zrovec2 &B)