Say I\'ve got
SDL_Rect rect; rect.x = 5; // rect.x is of type \"Uint16\" int y = 11;
and I want to perform the operation rect.x/y
rect.x/y
You need to cast your variables.
float result = (float)rect.x / (float)y; int rounded = ceil(result);