Isn’t that a more elegant solution if SDL_lroundf
is already available?
Lines 89
// const SDL_Rect cliprect = { (int) SDL_roundf(cliprect_position.x), (int) SDL_roundf(cliprect_position.y), CLIPRECT_SIZE, CLIPRECT_SIZE };
const SDL_Rect cliprect = { SDL_lroundf(cliprect_position.x), SDL_lroundf(cliprect_position.y), CLIPRECT_SIZE, CLIPRECT_SIZE };
Using SDL_lroundf
in this situation would involve an implicit conversion from long
to int
.
If I understand correctly, SDL_lroundf
varies depending on the system to 32 or 64bit long
?
A long
is 32-bit or 64-bit, depending on the system.