VSF Documented
Macros
minmax.h File Reference
#include "utilities/vsf_utilities.h"

Go to the source code of this file.

Macros

#define min(x, y)   vsf_min(x, y)
 
#define max(x, y)   vsf_max(x, y)
 
#define min_t(type, x, y)   vsf_min((type)x, (type)y)
 
#define max_t(type, x, y)   vsf_max((type)x, (type)y)
 
#define clamp(val, lo, hi)   min((typeof(val))max(val, lo), hi)
 

Macro Definition Documentation

◆ min

#define min (   x,
 
)    vsf_min(x, y)

◆ max

#define max (   x,
 
)    vsf_max(x, y)

◆ min_t

#define min_t (   type,
  x,
 
)    vsf_min((type)x, (type)y)

◆ max_t

#define max_t (   type,
  x,
 
)    vsf_max((type)x, (type)y)

◆ clamp

#define clamp (   val,
  lo,
  hi 
)    min((typeof(val))max(val, lo), hi)