diff options
author | Piotr Dziwiński <piotrdz@gmail.com> | 2012-08-12 10:15:19 -0700 |
---|---|---|
committer | Piotr Dziwiński <piotrdz@gmail.com> | 2012-08-12 10:15:19 -0700 |
commit | 50deedb6cbc927f6c7d6c3c5e9134d11c20782ae (patch) | |
tree | 8eb3fbd914cfea11660534b296bfddcffcc5f7b4 /src/math/const.h | |
parent | bc24b9f9e516e657fcc0034808e010287fc2e393 (diff) | |
parent | 62b545128f37746c343760e464872655b5523c6f (diff) | |
download | colobot-50deedb6cbc927f6c7d6c3c5e9134d11c20782ae.tar.gz colobot-50deedb6cbc927f6c7d6c3c5e9134d11c20782ae.tar.bz2 colobot-50deedb6cbc927f6c7d6c3c5e9134d11c20782ae.zip |
Merge pull request #36 from Erihel/dev
Merge of new features: plugins and INI profile, changes from dev-graphics
Diffstat (limited to 'src/math/const.h')
-rw-r--r-- | src/math/const.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/math/const.h b/src/math/const.h index dd7ab0f..0b6f971 100644 --- a/src/math/const.h +++ b/src/math/const.h @@ -14,28 +14,30 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -/** @defgroup MathConstModule math/const.h - Contains the math constants used in math functions. +/** + * \file math/const.h + * \brief Constants used in math functions */ #pragma once +#include <cmath> + // Math module namespace namespace Math { -/* @{ */ // start of group //! Tolerance level -- minimum accepted float value const float TOLERANCE = 1e-6f; //! Very small number (used in testing/returning some values) -const float VERY_SMALL = 1e-6f; +const float VERY_SMALL_NUM = 1e-6f; //! Very big number (used in testing/returning some values) -const float VERY_BIG = 1e6f; +const float VERY_BIG_NUM = 1e6f; //! Huge number -const float HUGE = 1.0e+38f; +const float HUGE_NUM = 1.0e+38f; //! PI const float PI = 3.14159265358979323846f; @@ -45,6 +47,8 @@ const float DEG_TO_RAD = 0.01745329251994329547f; //! Radians to degrees multiplier const float RAD_TO_DEG = 57.29577951308232286465f; -/* @} */ // end of group +//! Natural logarithm of 2 +const float LOG_2 = log(2.0f); + }; // namespace Math |