SDL_min - Return the lesser of two values.
Contents
Availability
This macro is available since SDL 3.2.0.
Simple Directmedia Layer SDL 3.2.20 SDL_min(3)
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.
Name
SDL_min - Return the lesser of two values.
Return Value
Returns the lesser of x and y.
Synopsis
#include<SDL3/SDL_stdinc.h>#defineSDL_min(x,y)(((x)<(y))?(x):(y))
Thread Safety
It is safe to call this macro from any thread.
