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

Go to the source code of this file.

Macros

#define M_PI   3.14159265358979323846264338327
 
#define MAX(a, b)   ((a) > (b) ? (a) : (b))
 
#define MIN(a, b)   ((a) < (b) ? (a) : (b))
 

Functions

static INLINE uint32_t next_pow2 (uint32_t v)
 
static INLINE uint32_t prev_pow2 (uint32_t v)
 

Macro Definition Documentation

◆ M_PI

#define M_PI   3.14159265358979323846264338327

◆ MAX

#define MAX (   a,
  b 
)    ((a) > (b) ? (a) : (b))

◆ MIN

#define MIN (   a,
  b 
)    ((a) < (b) ? (a) : (b))

Function Documentation

◆ next_pow2()

static INLINE uint32_t next_pow2 ( uint32_t  v)
static

next_pow2: : initial value

Get next power of 2 value based on initial value.

Returns: next power of 2 value (derived from ).

Here is the caller graph for this function:

◆ prev_pow2()

static INLINE uint32_t prev_pow2 ( uint32_t  v)
static

prev_pow2: : initial value

Get previous power of 2 value based on initial value.

Returns: previous power of 2 value (derived from ).