[DEV] add API to matrix 2
This commit is contained in:
parent
1c1ec47bd2
commit
9dbee8a4a6
@ -157,6 +157,11 @@ vec2 etk::Matrix2::operator * (const vec2& _obj) const {
|
||||
_obj.x()*m_mat[4] + _obj.y()*m_mat[3] + m_mat[5]);
|
||||
}
|
||||
|
||||
vec2 etk::Matrix2::applyScaleRotation(const vec2& _obj) const {
|
||||
return vec2(_obj.x()*m_mat[0] + _obj.y()*m_mat[1],
|
||||
_obj.x()*m_mat[4] + _obj.y()*m_mat[3]);
|
||||
}
|
||||
|
||||
etk::Matrix2 etk::Matrix2::operator ~ () const {
|
||||
etk::Matrix2 tmp(*this);
|
||||
tmp.invert();
|
||||
|
@ -78,6 +78,7 @@ namespace etk {
|
||||
*****************************************************/
|
||||
Matrix2 operator * (const Matrix2& _obj);
|
||||
vec2 operator * (const vec2& _obj) const;
|
||||
vec2 applyScaleRotation(const vec2& _obj) const;
|
||||
/*****************************************************
|
||||
* ~ operator
|
||||
*****************************************************/
|
||||
|
Loading…
x
Reference in New Issue
Block a user