Colobot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
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-2014, Daniel Roux, EPSITEC SA & TerranovaTeam
4  * http://epsiteс.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 
36 const float TOLERANCE = 1e-6f;
37 
39 const float VERY_SMALL_NUM = 1e-6f;
41 const float VERY_BIG_NUM = 1e6f;
42 
44 const float HUGE_NUM = 1.0e+38f;
45 
47 const float PI = 3.14159265358979323846f;
48 
50 const float DEG_TO_RAD = 0.01745329251994329547f;
52 const float RAD_TO_DEG = 57.29577951308232286465f;
53 
55 const float LOG_2 = log(2.0f);
56 
57 
58 } // namespace Math
59 
const float DEG_TO_RAD
Degrees to radians multiplier.
Definition: const.h:50
const float TOLERANCE
Tolerance level – minimum accepted float value.
Definition: const.h:36
const float PI
PI.
Definition: const.h:47
const float VERY_SMALL_NUM
Very small number (used in testing/returning some values)
Definition: const.h:39
const float HUGE_NUM
Huge number.
Definition: const.h:44
const float RAD_TO_DEG
Radians to degrees multiplier.
Definition: const.h:52
Namespace for (new) math code.
Definition: const.h:32
const float LOG_2
Natural logarithm of 2.
Definition: const.h:55
const float VERY_BIG_NUM
Very big number (used in testing/returning some values)
Definition: const.h:41