KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
intmath.h File Reference

Functions to help with integer math. More...

#include <kos/cdefs.h>
#include <stdbool.h>

Go to the source code of this file.

Functions

static bool is_power_of_two (unsigned int val)
 
static unsigned int log2_rdown (unsigned int val)
 
static unsigned int log2_rup (unsigned int val)
 

Detailed Description

Functions to help with integer math.

Author
Paul Cercueil

Function Documentation

◆ is_power_of_two()

static bool is_power_of_two ( unsigned int val)
inlinestatic

Referenced by log2_rup().

◆ log2_rdown()

static unsigned int log2_rdown ( unsigned int val)
inlinestatic

Referenced by log2_rup().

◆ log2_rup()

static unsigned int log2_rup ( unsigned int val)
inlinestatic

References is_power_of_two(), and log2_rdown().