Definition at line 15 of file transform.cpp.
15 {
18 }
23 }
26 }
27
30
31 const bool has_rotation = (
rotation != 0.0f);
32
33 if (has_rotation) {
35 float cos_theta = cosf(radians);
36 float sin_theta = sinf(radians);
37 float x_rotated =
x * cos_theta -
y * sin_theta;
38 float y_rotated =
x * sin_theta +
y * cos_theta;
39 return vec2f(x_rotated, y_rotated);
40 }
42}
unsigned int xy(unsigned int x, unsigned int y)
References is_identity(), offset_x, offset_y, PI, rotation, scale_x, scale_y, x, xy(), and y.