Definition at line 92 of file transform.cpp.
92 {
93 vec2<alpha16> out =
xy;
94
95
97 constexpr int32_t MID = 0x7FFF;
98
99
100 int32_t
x = int32_t(out.x) - MID;
101 int32_t
y = int32_t(out.y) - MID;
102
103
106
107
108 int32_t xr = (
x * c -
y * s) >> 15;
109 int32_t yr = (
x * s +
y * c) >> 15;
110
111
114 }
115
116
118 uint32_t tx = uint32_t(out.x) *
scale_x;
120 }
122 uint32_t ty = uint32_t(out.y) *
scale_y;
124 }
125
126
131
132 return out;
133}
unsigned int xy(unsigned int x, unsigned int y)
LIB8STATIC int16_t cos16(uint16_t theta)
Fast 16-bit approximation of cos(x).
#define sin16
Platform-independent alias of the fast sin implementation.
LIB8STATIC_ALWAYS_INLINE uint16_t map32_to_16(uint32_t x)
References cos16(), map32_to_16(), offset_x, offset_y, rotation, scale_x, scale_y, sin16, fl::vec2< T >::x, x, xy(), fl::vec2< T >::y, and y.