Menu

[r94]: / trunk / include / small / dcovec3.hpp  Maximize  Restore  History

Download this file

11 lines (10 with data), 311 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
//=============================================================================
/*! calculate vector product only for 3D vector */
inline dcovec3 operator/(const dcovec3& A, const dcovec3& B)
{
dcovec3 C;
C(0) =A(1)*B(2) -A(2)*B(1);
C(1) =A(2)*B(0) -A(0)*B(2);
C(2) =A(0)*B(1) -A(1)*B(0);
return C;
}
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.