Commit 35c1bbfa49b1247c2c6240f7f95871f3b3331874

David Gow 2021-08-13T21:43:00

SDL_stdinc.h: Add an SDL_clamp() function Add a function to clamp a value to a range. SDL_clamp(x, a, b) is equivalent to SDL_min(a, SDL_max(x, b)): it ensures that x is not smaller than a, nor larger than b. While, as best I can tell, this isn't actually standardised anywhere, it's a very useful function/macro to have.