Changeset 8333 for code/branches/kicklib2/src/libraries/util
- Timestamp:
- Apr 26, 2011, 4:46:26 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/kicklib2/src/libraries/util/Math.h
r7427 r8333 66 66 namespace orxonox 67 67 { 68 // C++ doesn't define any constants for pi, e, etc. 68 /** Often used numerical constants because C++ doesn't define any. 69 @note 70 The values here are decimal representations of the approximate floating 71 point value as it is stored according to the IEEE 754 standard. 72 */ 69 73 namespace math 70 74 { 71 const float pi = 3.14159265f; ///< PI 72 const float pi_2 = 1.57079633f; ///< PI / 2 73 const float pi_4 = 7.85398163e-1f; ///< PI / 4 74 const float e = 2.71828183f; ///< e 75 const float sqrt2 = 1.41421356f; ///< sqrt(2) 76 const float sqrt2_2 = 7.07106781e-1f; ///< sqrt(2) / 2 77 78 const double pi_d = 3.14159265358979324; ///< PI (double) 79 const double pi_2_d = 1.57079632679489662; ///< PI / 2 (double) 80 const double pi_4_d = 7.85398163397448310e-1; ///< PI / 4 (double) 81 const double e_d = 2.71828182845904524; ///< e (double) 82 const double sqrt2_d = 1.41421356237309505; ///< sqrt(2) (double) 83 const double sqrt2_2_d = 7.07106781186547524e-1; ///< sqrt(2) / 2 (double) 75 const float twoPi = 6.283185482025146484375f; ///< PI * 2 76 const float pi = 3.1415927410125732421875f; ///< PI 77 const float pi_2 = 1.57079637050628662109375f; ///< PI / 2 78 const float pi_4 = 0.785398185253143310546875f; ///< PI / 4 79 const float e = 2.718281269073486328125f; ///< e 80 const float sqrt2 = 1.41421353816986083984375f; ///< sqrt(2) 81 const float sqrt2_2 = 0.707106769084930419921875f; ///< sqrt(2) / 2 84 82 } 85 83
Note: See TracChangeset
for help on using the changeset viewer.