SDL/VisualC-GDK
Sam Lantinga 7f23d71b6a Added SDL_modf() and SDL_modff()
This function is useful for accumulating relative mouse motion if you want to only handle whole pixel movement.
e.g.
static float dx_frac, dy_frac;
float dx, dy;

/* Accumulate new motion with previous sub-pixel motion */
dx = event.motion.xrel + dx_frac;
dy = event.motion.yrel + dy_frac;

/* Split the integral and fractional motion, dx and dy will contain whole pixel deltas */
dx_frac = SDL_modff(dx, &dx);
dy_frac = SDL_modff(dy, &dy);
if (dx != 0.0f || dy != 0.0f) {
    ...
}
2022-12-29 23:12:19 -08:00
..
SDL Added SDL_modf() and SDL_modff() 2022-12-29 23:12:19 -08:00
SDL_test Remove OutDir and IntDir from GDK projects 2022-12-10 09:50:47 -08:00
logos Xbox GDKX support (#5869) 2022-07-01 13:59:14 -07:00
tests SDL API renaming: SDL_gamecontroller.h 2022-12-27 09:47:24 -08:00
SDL.sln SDL API renaming: SDL_gamecontroller.h 2022-12-27 09:47:24 -08:00
clean.sh Fix format specifiers for WPARAM/LPARAM values, they are UINT_PTR. 2022-07-05 21:42:20 -07:00