PER Firmware
Loading...
Searching...
No Matches
abs.h File Reference

Absolute value functions utility header. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ABS(x)
 

Functions

static signed int abs_i (int x)
 
static float abs_f (float x)
 

Detailed Description

Absolute value functions utility header.

Typesafe, supporting ints and floats. Integer promotions also cover int8_t, int16_t

Author
Irving Wang (irvin.nosp@m.gw@p.nosp@m.urdue.nosp@m..edu)

Macro Definition Documentation

◆ ABS

#define ABS ( x)
Value:
_Generic((x) + 0, \
int: abs_i, \
float: abs_f \
)((x))
static signed int abs_i(int x)
Definition abs.h:15
static float abs_f(float x)
Definition abs.h:20

Function Documentation

◆ abs_f()

static float abs_f ( float x)
inlinestatic

◆ abs_i()

static signed int abs_i ( int x)
inlinestatic