15 #define mateq(m1, m2) memcpy(m1, m2, sizeof(matriz_data))
18 Matriz::matriz_data const Matriz::MATIDEN = { {1, 0}, {0, 1}};
27 void Matriz::rota(int code)
31 float const cs = (odd(code)) ? 0 : (1 - code);
32 float const sn = (odd(code)) ? (2 - code) : 0;
41 void Matriz::escala(float x, float y)
51 void Matriz::matmat(matriz_data & a)
54 c[0][0] = a[0][0] * m_[0][0] + a[0][1] * m_[1][0];
55 c[1][0] = a[1][0] * m_[0][0] + a[1][1] * m_[1][0];
56 c[0][1] = a[0][0] * m_[0][1] + a[0][1] * m_[1][1];
57 c[1][1] = a[1][0] * m_[0][1] + a[1][1] * m_[1][1];
62 void Matriz::transf(float xp, float yp, float & x, float & y)
64 x = m_[0][0] * xp + m_[0][1] * yp;
65 y = m_[1][0] * xp + m_[1][1] * yp;