Definition at line 64 of file transform.cpp.
65 {
67
68
70 if (max.x > min.x) {
71
72 uint32_t numer = static_cast<uint32_t>(max.x - min.x) << 16;
73
74 uint32_t scale32 = numer / 0xFFFF;
76 }
78 if (max.y > min.y) {
79
80 uint32_t numer = static_cast<uint32_t>(max.y - min.y) << 16;
81
82 uint32_t scale32 = numer / 0xFFFF;
84 }
86 tx.offset_x = min.x;
87 tx.offset_y = min.y;
89 return tx;
90}
LIB8STATIC uint16_t scale16(uint16_t i, fract16 scale)
Scale a 16-bit unsigned value by an 16-bit value, which is treated as the numerator of a fraction who...
References Transform16(), offset_x, offset_y, rotation, scale16(), scale_x, scale_y, fl::vec2< T >::x, and fl::vec2< T >::y.