Menu

[r124]: / trunk / include / small / drovec3-function.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 drovec3 operator/(const drovec3& A, const drovec3& B)
{
drovec3 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.