Colobot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
const.h
Go to the documentation of this file.
1 // * This file is part of the COLOBOT source code
2 // * Copyright (C) 2012, Polish Portal of Colobot (PPC)
3 // *
4 // * This program is free software: you can redistribute it and/or modify
5 // * it under the terms of the GNU General Public License as published by
6 // * the Free Software Foundation, either version 3 of the License, or
7 // * (at your option) any later version.
8 // *
9 // * This program is distributed in the hope that it will be useful,
10 // * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // * GNU General Public License for more details.
13 // *
14 // * You should have received a copy of the GNU General Public License
15 // * along with this program. If not, see http://www.gnu.org/licenses/.
16 
22 #pragma once
23 
24 
25 #include <cmath>
26 
27 
28 // Math module namespace
29 namespace Math {
30 
31 
33 const float TOLERANCE = 1e-6f;
34 
36 const float VERY_SMALL_NUM = 1e-6f;
38 const float VERY_BIG_NUM = 1e6f;
39 
41 const float HUGE_NUM = 1.0e+38f;
42 
44 const float PI = 3.14159265358979323846f;
45 
47 const float DEG_TO_RAD = 0.01745329251994329547f;
49 const float RAD_TO_DEG = 57.29577951308232286465f;
50 
52 const float LOG_2 = log(2.0f);
53 
54 
55 } // namespace Math
56