Method centerToParent not working properly due PIXEL_INTEGRAL
Closed this issue · 2 comments
nullproduction commented
I deleted PIXEL_INTEGRAL from centerToParent and then became the center of the button.
bastianh commented
the PIXEL_INTEGRAL macro is missing brackets... so
basically it is:
#define PIXEL_INTEGRAL(pointValue) (roundf(pointValue * scale) / scale)
so PIXEL_INTEGRAL(4-3)
is expanded to (roundf(4 - 3 * scale) / scale)
and 3*scale is calculated before 4-3
freak4pc commented
Upcoming Swift version should fix this. Might fix the Objective-C version as well :)