//=============================================================================
/*! calculate vector product only for 2D vector */
inline double operator/(const dcovec2& A, const dcovec2& B)
{
return A(0)*B(1) -A(1)*B(0);
}
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
//=============================================================================
/*! */
inline double v2t(const dcovec2& v)
{
return atan2(v(1),v(0));
}
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
//=============================================================================
/*! */
inline dcovec2 rotate(const dcovec2& v, const double& t)
{
dcovec2 w;
w(0)=v(0)*cos(t)-v(1)*sin(t);
w(1)=v(0)*sin(t)+v(1)*cos(t);
return w;
}