rsys

Basic data structures and low-level features
git clone git://git.meso-star.fr/rsys.git
Log | Files | Refs | README | LICENSE

commit ef9a857edea6b3bc981272bf80dcd3991c47149a
parent c89cead44fc7279aa5b1db06da7d8a2f57801852
Author: vaplv <vaplv@free.fr>
Date:   Wed, 18 Sep 2013 15:34:17 +0200

Remove the `math.h' file

Diffstat:
Dsrc/math.h | 32--------------------------------
Msrc/mem_allocator.c | 2++
2 files changed, 2 insertions(+), 32 deletions(-)

diff --git a/src/math.h b/src/math.h @@ -1,32 +0,0 @@ -#ifndef RSYS_MATH_H -#define RSYS_MATH_H - -#define PI 3.14159265358979323846 - -#define DEG2RAD(x) \ - ((x)*0.0174532925199432957692369076848861L) - -#define RAD2DEG(x) \ - ((x)*57.2957795130823208767981548141051703L) - -#define IS_POWER_OF_2(i) \ - ((i) > 0 && ((i) & ((i)-1)) == 0) - -#define NEXT_POWER_OF_2(i, j) \ - (j) = (i > 0) ? (i) - 1 : (i), \ - (j) |= (j) >> 1, \ - (j) |= (j) >> 2, \ - (j) |= (j) >> 4, \ - (j) |= (j) >> 8, \ - (sizeof(i) > 2 ? (j) |= (j) >> 16, (void)0 : (void)0), \ - (sizeof(i) > 8 ? (j) |= (j) >> 32, (void)0 : (void)0), \ - ++(j) - -#define MAX(a, b) \ - ((a) > (b) ? (a) : (b)) - -#define MIN(a, b) \ - ((a) < (b) ? (a) : (b)) - -#endif /* RSYS_MATH_H */ - diff --git a/src/mem_allocator.c b/src/mem_allocator.c @@ -4,6 +4,8 @@ #include <malloc.h> #include <string.h> +#define IS_POWER_OF_2(i) ((i) > 0 && ((i) & ((i)-1)) == 0) + /******************************************************************************* * Default allocator functions ******************************************************************************/