summaryrefslogtreecommitdiffstats
path: root/Smoke/funcs.h
blob: 7f1370e3fc124d8a8e3405deb495f1684ec7fd83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef _FUNCS_H
#define _FUNCS_H

#ifndef G_OS_WIN32
#define WIN32_LEAN_AND_MEAN 1
#define min(a, b) (a < b ? a : b)
#define max(a, b) (a > b ? a : b)
#endif

#define MIN3(a, b, c) (a < b ? (a < c ? a : (b < c ? b : c)) : (b < c ? b : c))
#define MAX3(a, b, c) (a > b ? (a > c ? a : (b > c ? b : c)) : (b > c ? b : c))

#define round(x) (int)(x < 0 ? x - 0.5 : x + 0.5)

#define FALSE 0
#define TRUE !FALSE

float quake_root(float number);
float vec_len2f(float x, float y);
float vec_len3f(float x, float y, float z);

#endif