RetroArch
Functions
clamping.h File Reference
#include <stdint.h>
#include <retro_inline.h>
Include dependency graph for clamping.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

static INLINE float clamp_float (float val, float lower, float upper)
 
static INLINE uint8_t clamp_8bit (int val)
 

Function Documentation

◆ clamp_8bit()

static INLINE uint8_t clamp_8bit ( int  val)
static

clamp_8bit: : initial value

Clamps an unsigned 8-bit value.

Returns: a clamped value of initial unsigned 8-bit value .

Here is the caller graph for this function:

◆ clamp_float()

static INLINE float clamp_float ( float  val,
float  lower,
float  upper 
)
static

clamp_float: : initial value : lower limit that value should be clamped against : upper limit that value should be clamped against

Clamps a floating point value.

Returns: a clamped value of initial float value .

Here is the caller graph for this function: