Nu:Tekt NTS-1 digital SDK
v1.1-0
|
Integer Math Utilities. More...
#include <stdint.h>
Go to the source code of this file.
Functions | |
Clipping Operations | |
static int32_t | clipmaxi32 (const int32_t x, const int32_t m) |
Clip upper bound of signed integer x to m (inclusive) | |
static int32_t | clipmini32 (const int32_t m, const int32_t x) |
Clip lower bound of signed integer x to m (inclusive) | |
static int32_t | clipminmaxi32 (const int32_t min, const int32_t x, const int32_t max) |
Clip signe integer x between min and max (inclusive) | |
static uint32_t | clipmaxu32 (const uint32_t x, const uint32_t m) |
Clip upper bound of unsigned integer x to m (inclusive) | |
static uint32_t | clipminu32 (const uint32_t m, const uint32_t x) |
Clip lower bound of unsigned integer x to m (inclusive) | |
static uint32_t | clipminmaxu32 (const uint32_t min, const uint32_t x, const uint32_t max) |
Clip unsigned integer x between min and max (inclusive) | |
Power of 2s | |
static uint32_t | nextpow2_u32 (uint32_t x) |
Compute next power of 2 greater than x. | |
static uint8_t | ispow2_u32 (const uint32_t x) |
Check if x is a power of 2. | |
Integer Math Utilities.
Definition in file int_math.h.