33 const bool has_rotation = (rotation != 0.0f);
39 float x_rotated =
x * cos_theta -
y * sin_theta;
40 float y_rotated =
x * sin_theta +
y * cos_theta;
41 return vec2f(x_rotated, y_rotated);
53 u32 numer =
static_cast<u32
>(max_value) << 16;
55 u32 scale32 = numer / 0xFFFF;
56 scale16 =
static_cast<alpha16
>(scale32);
74 u32 numer =
static_cast<u32
>(
max.x -
min.x) << 16;
76 u32 scale32 = numer / 0xFFFF;
77 scale16 =
static_cast<alpha16
>(scale32);
82 u32 numer =
static_cast<u32
>(
max.y -
min.y) << 16;
84 u32 scale32 = numer / 0xFFFF;
85 scale16 =
static_cast<alpha16
>(scale32);
90 tx.rotation = rotation;
95 vec2<alpha16> out =
xy;
99 constexpr i32 MID = 0x7FFF;
102 i32
x = i32(out.x) - MID;
103 i32
y = i32(out.y) - MID;
106 i32 c = cos16(rotation);
107 i32 s = sin16(rotation);
110 i32 xr = (
x * c -
y * s) >> 15;
111 i32 yr = (
x * s +
y * c) >> 15;
114 out.x = alpha16(xr + MID);
115 out.y = alpha16(yr + MID);
130 out.x = alpha16(out.x + offset_x);
132 out.y = alpha16(out.y + offset_y);
146 offset_y == 0.0f && rotation == 0.0f);
153 out.m[0][2] = offset_x();
156 out.m[1][2] = offset_y();
uint32_t scale_y[NUM_LAYERS]
uint32_t scale_x[NUM_LAYERS]
fl::UISlider scale("Scale", 4,.1, 4,.1)
unsigned int xy(unsigned int x, unsigned int y)
#define FL_DISABLE_WARNING(warning)
#define FL_DISABLE_WARNING_PUSH
#define FL_DISABLE_WARNING_POP
constexpr common_type_t< T, U > max(T a, U b) FL_NO_EXCEPT
FL_DISABLE_WARNING_PUSH U constexpr common_type_t< T, U > min(T a, U b) FL_NO_EXCEPT
Memory functions are available in fl:: namespace via fl/stl/cstring.h Using declarations cannot work ...
constexpr T radians(T deg) FL_NO_EXCEPT
Integer mapping functions between different integer sizes.
Legacy compatibility header for trigonometry functions.
u16 map32_to_16(u32 x) FL_NO_EXCEPT
FL_DISABLE_WARNING_PUSH U constexpr common_type_t< T, U > min(T a, U b) FL_NO_EXCEPT
float sinf(float value) FL_NO_EXCEPT
float cosf(float value) FL_NO_EXCEPT
Base definition for an LED controller.