versor
3.0
C++11 library for Geometric algebra
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
vsr
util
vsr_constants.h
1
/*
2
* xConstants.h
3
* gelatin (!) old school name
4
*
5
6
IRRATIONALS AND ROUTINES
7
8
to do: redefine as VERSOR_PI etc ...
9
10
* Created by x on 5/22/09.
11
* Copyright 2009 __MyCompanyName__. All rights reserved.
12
*
13
*/
14
15
#ifndef VSR_CONSTANTS_H_INCLUDED
16
#define VSR_CONSTANTS_H_INCLUDED
17
18
namespace
vsr
{
19
20
#ifndef PI
21
#define PI 3.141592653589793
22
#endif
23
24
#ifndef TWOPI
25
#define TWOPI 6.283185307179586
26
#endif
27
28
#ifndef PIOVERTWO
29
#define PIOVERTWO 1.570796326794897
30
#endif
31
32
#ifndef PIOVERFOUR
33
#define PIOVERFOUR 0.785398163397448
34
#endif
35
36
#ifndef THREEPIOVERTWO
37
#define THREEPIOVERTWO 4.71238898038469
38
#endif
39
40
#ifndef PHI
41
#define PHI 1.61803
42
#endif
43
44
#ifndef ONEOVERPHI
45
#define ONEOVERPHI .61803
46
#endif
47
48
#ifndef CHANCE
49
#define CHANCE 1.13198824
50
#endif
51
52
#ifndef GOLDENANGLE
53
#define GOLDENANGLE 137.507764
54
#endif
55
56
#ifndef GOLDENRADIAN
57
#define GOLDENRADIAN 2.399963
58
#endif
59
60
#ifndef SMALLRAD
61
#define SMALLRAD (PI * 36 / 180)
62
#endif
63
64
#ifndef MEDIUMRAD
65
#define MEDIUMRAD (PI * 72 / 180)
66
#endif
67
68
#ifndef LARGERAD
69
#define LARGERAD (PI * 108 / 180)
70
#endif
71
72
#ifndef ROOT2
73
#define ROOT2 1.41421
74
#endif
75
76
#ifndef ROOT3
77
#define ROOT3 1.73205
78
#endif
79
80
#ifndef FPERROR
81
#define FPERROR .000001
82
#endif
83
84
#ifndef ERROR
85
#define ERROR(x,y) (x<=y && x>=-y)
86
#endif
87
88
#ifndef MAXRADIUS
89
#define MAXRADIUS 100000
90
#endif
91
92
#ifndef FERROR
93
#define FERROR(x) (fabs(x)<=FPERROR)
94
#endif
95
96
#ifndef CLAMP
97
#define CLAMP(val,min,max) val<min?min:val>max?max:val
98
#endif
99
100
#ifndef D2R
101
#define D2R(val) PI*val/180.0
102
#endif
103
104
#ifndef ZERO
105
#define ZERO(x) (fabs(x)<FPERROR?0:x)
106
#endif
107
108
109
}
//vsr::
110
111
#endif
112
vsr
the versor library namespace
Definition:
vsr_algebra.h:29
Generated on Tue Jul 28 2015 16:26:05 for versor by
1.8.10