-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathutils.h
More file actions
33 lines (24 loc) · 663 Bytes
/
utils.h
File metadata and controls
33 lines (24 loc) · 663 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef UTILS_H_INCL
#define UTILS_H_INCL
#include "vec3.h"
#include "mat4.h"
#include <btBulletDynamicsCommon.h> // btVector3
#define PI 3.14159265358979323846264f
#define PI2 1.5707963267948966192313f
#define RADTODEG 57.2957795130823209f
#define DEGTORAD 0.01745329251994329f
typedef unsigned int uint;
template <typename T>
T clamp(T v, T a, T b)
{
(v < a ? a : v) > b ? b : v;
}
void printvec(const vec3& v);
void printfloat(float f);
float frand();
float frandm();
btVector3 createBulletVector(const vec3& v);
vec3 createIonconVector(const btVector3& v);
mat4 getOpenGLMatrixFromFrameBasis(const mat4& m);
char* basename(const char* fname);
#endif