Colobot
const.h
Go to the documentation of this file.
1 /*
2  * This file is part of the Colobot: Gold Edition source code
3  * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam
4  * http://epsitec.ch; http://colobot.info; http://github.com/colobot
5  *
6  * This program is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14  * See the GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see http://gnu.org/licenses
18  */
19 
25 #pragma once
26 
27 
28 #include <cmath>
29 
30 
31 // Math module namespace
32 namespace Math
33 {
34 
35 
37 const float TOLERANCE = 1e-6f;
38 
40 const float VERY_SMALL_NUM = 1e-6f;
42 const float VERY_BIG_NUM = 1e6f;
43 
45 const float HUGE_NUM = 1.0e+38f;
46 
48 const float PI = 3.14159265358979323846f;
49 
51 const float DEG_TO_RAD = 0.01745329251994329547f;
53 const float RAD_TO_DEG = 57.29577951308232286465f;
54 
56 const float LOG_2 = log(2.0f);
57 
58 
59 } // namespace Math
60 
const float DEG_TO_RAD
Degrees to radians multiplier.
Definition: const.h:51
const float TOLERANCE
Tolerance level – minimum accepted float value.
Definition: const.h:37
const float PI
PI.
Definition: const.h:48
const float VERY_SMALL_NUM
Very small number (used in testing/returning some values)
Definition: const.h:40
const float HUGE_NUM
Huge number.
Definition: const.h:45
const float RAD_TO_DEG
Radians to degrees multiplier.
Definition: const.h:53
Namespace for (new) math code.
Definition: device.h:39
const float LOG_2
Natural logarithm of 2.
Definition: const.h:56
const float VERY_BIG_NUM
Very big number (used in testing/returning some values)
Definition: const.h:42