logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SDL_max - Return the greater of two values.

Availability

       This macro is available since SDL 3.2.0.

Simple Directmedia Layer                           SDL 3.2.10                                         SDL_max(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.

Header File

       Defined in SDL3/SDL_stdinc.h

Name

       SDL_max - Return the greater of two values.

Return Value

       Returns the lesser of x and y .

Synopsis

#include"SDL3/SDL.h"#defineSDL_max(x,y)(((x)>(y))?(x):(y))

Thread Safety

       It is safe to call this macro from any thread.

See Also