FastLED 3.9.15
Loading...
Searching...
No Matches

◆ compile()

Matrix3x3f fl::TransformFloat::compile ( ) const

Definition at line 147 of file transform.cpp.

147 {
148 Matrix3x3f out;
149 out.m[0][0] = scale_x() * cosf(rotation() * 2.0f * PI);
150 out.m[0][1] = -scale_y() * sinf(rotation() * 2.0f * PI);
151 out.m[0][2] = offset_x();
152 out.m[1][0] = scale_x() * sinf(rotation() * 2.0f * PI);
153 out.m[1][1] = scale_y() * cosf(rotation() * 2.0f * PI);
154 out.m[1][2] = offset_y();
155 out.m[2][2] = 1.0f;
156 return out;
157}
#define PI
Definition math_macros.h:57
float offset_x() const
Definition transform.h:95
float scale_x() const
Definition transform.h:93
float offset_y() const
Definition transform.h:96
float rotation() const
Definition transform.h:98
float scale_y() const
Definition transform.h:94

References fl::Matrix3x3f::m, offset_x(), offset_y(), PI, rotation(), scale_x(), and scale_y().

+ Here is the call graph for this function: