| 146 | } |
| 147 | |
| 148 | Matrix3x3f TransformFloat::compile() const { |
| 149 | Matrix3x3f out; |
| 150 | out.m[0][0] = scale_x() * cosf(rotation() * 2.0f * FL_PI); |
| 151 | out.m[0][1] = -scale_y() * sinf(rotation() * 2.0f * FL_PI); |
| 152 | out.m[0][2] = offset_x(); |
| 153 | out.m[1][0] = scale_x() * sinf(rotation() * 2.0f * FL_PI); |
| 154 | out.m[1][1] = scale_y() * cosf(rotation() * 2.0f * FL_PI); |
| 155 | out.m[1][2] = offset_y(); |
| 156 | out.m[2][2] = 1.0f; |
| 157 | return out; |
| 158 | } |
| 159 | |
| 160 | } // namespace fl |
| 161 |