SDL_max - Man Page
Return the greater of two values.
Synopsis
#include <SDL3/SDL_stdinc.h> #define SDL_max(x, y) (((x) > (y)) ? (x) : (y))
Description
This is a helper macro that might be more clear than writing out the comparisons directly, and works with any type that can be compared with the > operator. However, it double-evaluates both its parameters, so do not use expressions with side-effects here.
Macro Parameters
- x
the first value to compare.
- y
the second value to compare.
Return Value
Returns the lesser of x and y.
Thread Safety
It is safe to call this macro from any thread.
Availability
This macro is available since SDL 3.2.0.
Info
SDL 3.2.16 Simple Directmedia Layer SDL3 FUNCTIONS