[DEV] Add cross product at vector2D

This commit is contained in:
Edouard DUPIN 2015-12-01 21:45:55 +01:00
parent 23e618a9ef
commit 5b94358126

View File

@ -216,6 +216,14 @@ namespace etk {
--(*this);
return result;
}
/**
* @brief Return the cross product
* @param v The other vector in the cross product
*/
btScalar cross(const Vector2D<T>& _v) const {
return m_floats[0] * _v.m_floats[1]
- m_floats[1] * _v.m_floats[0];
}
/**
* @brief Return the dot product
* @param v The other vector in the dot product