summaryrefslogtreecommitdiffstats
path: root/nebu/include/base/nebu_util.h
blob: 774e78426d4ecb84ff528791d88b5e990dcb4d99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef NEBU_UTIL_H
#define NEBU_UTIL_H

/* small utility macros & functions */

#include "base/nebu_types.h"
#include <math.h>

#define COS(X)	cos( (X) * M_PI/180.0 )
#define SIN(X)	sin( (X) * M_PI/180.0 )

#ifndef M_PI
#define M_PI 3.141592654
#endif

void randomPermutation( int N, int *nodes );
void clamp( float *f, float min, float max );
void addList(List **l, void* data);

#endif