Example #1
0
	void set_rotate(Matrix33f &m, float radian)
	{
		float sina = std::sin(radian);
		m.makeIdentity();
		m[0][0] = m[1][1] = std::cos(radian); 
		m[0][1] = -sina;
		m[1][0] =  sina; 
	}
Example #2
0
	void set_scale(Matrix33f &m, float sx, float sy)
	{
		m.makeIdentity();
		m[0][0] = sx;
		m[1][1] = sy;
	}
Example #3
0
	void set_translate(Matrix33f &m, float dx, float dy)
	{
		m.makeIdentity();
		m[0][2] = dx;
		m[1][2] = dy;
	}