Allolib
1.0
C++ Components For Interactive Multimedia
al_Constants.hpp
1
#ifndef INCLUDE_AL_MATH_CONSTANTS_HPP
2
#define INCLUDE_AL_MATH_CONSTANTS_HPP
3
4
/* Allocore --
5
Multimedia / virtual environment application class library
6
7
Copyright (C) 2009. AlloSphere Research Group, Media Arts & Technology, UCSB.
8
Copyright (C) 2012. The Regents of the University of California.
9
All rights reserved.
10
11
Redistribution and use in source and binary forms, with or without
12
modification, are permitted provided that the following conditions are met:
13
14
Redistributions of source code must retain the above copyright notice,
15
this list of conditions and the following disclaimer.
16
17
Redistributions in binary form must reproduce the above copyright
18
notice, this list of conditions and the following disclaimer in the
19
documentation and/or other materials provided with the distribution.
20
21
Neither the name of the University of California nor the names of its
22
contributors may be used to endorse or promote products derived from
23
this software without specific prior written permission.
24
25
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
29
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35
POSSIBILITY OF SUCH DAMAGE.
36
37
38
File description:
39
This includes various macro constants that may not already be defined in the
40
standard C/C++ math headers.
41
42
File author(s):
43
Lance Putnam, 2006, putnam.lance@gmail.com
44
*/
45
46
namespace
al
{
47
48
#ifndef M_E
49
#define M_E 2.71828182845904523536028747135266250
50
#endif
51
#ifndef M_LOG2E
52
#define M_LOG2E 1.44269504088896340735992468100189214
53
#endif
54
#ifndef M_LOG10E
55
#define M_LOG10E 0.434294481903251827651128918916605082
56
#endif
57
#ifndef M_LN2
58
#define M_LN2 0.693147180559945309417232121458176568
59
#endif
60
#ifndef M_LN10
61
#define M_LN10 2.30258509299404568401799145468436421
62
#endif
63
#ifndef M_PI
64
#define M_PI 3.14159265358979323846264338327950288
65
#endif
66
#ifndef M_PI_2
67
#define M_PI_2 1.57079632679489661923132169163975144
68
#endif
69
#ifndef M_PI_4
70
#define M_PI_4 0.785398163397448309615660845819875721
71
#endif
72
#ifndef M_1_PI
73
#define M_1_PI 0.318309886183790671537767526745028724
74
#endif
75
#ifndef M_2_PI
76
#define M_2_PI 0.636619772367581343075535053490057448
77
#endif
78
#ifndef M_2_SQRTPI
79
#define M_2_SQRTPI 1.12837916709551257389615890312154517
80
#endif
81
#ifndef M_SQRT2
82
#define M_SQRT2 1.41421356237309504880168872420969808
83
#endif
84
#ifndef M_SQRT1_2
85
#define M_SQRT1_2 0.707106781186547524400844362104849039
86
#endif
87
#ifndef M_DEG2RAD
88
#define M_DEG2RAD 0.017453292519943
89
#endif
90
#ifndef M_RAD2DEG
91
#define M_RAD2DEG 57.295779513082
92
#endif
93
94
// Some other useful constants
95
#ifndef M_2PI
96
#define M_2PI 6.283185307179586231941716828464095101
// 2pi
97
#endif
98
#ifndef M_4PI
99
#define M_4PI 12.566370614359172463937643765552465425
// 4pi
100
#endif
101
#ifndef M_1_2PI
102
#define M_1_2PI 0.159154943091895345554011992339482617
// 1/(2pi)
103
#endif
104
#ifndef M_3PI_2
105
#define M_3PI_2 4.712388980384689673996945202816277742
// 3pi/2
106
#endif
107
#ifndef M_3PI_4
108
#define M_3PI_4 2.356194490192343282632028017564707056
// 3pi/4
109
#endif
110
#ifndef M_LN001
111
#define M_LN001 -6.90775527898
// ln(0.001)
112
#endif
113
#ifndef M_SQRT_1_3
114
#define M_SQRT_1_3 0.577350269189626
// sqrt(1./3);
115
#endif
116
117
}
// namespace al
118
119
#endif
al
Definition:
al_App.hpp:23
C:
Users
Andres
source
repos
casm_viewer
external
tinc
external
allolib
include
al
math
al_Constants.hpp
Generated on Thu Apr 8 2021 13:24:22 for Allolib by
1.9.1