Panda3D
mathNumbers.cxx
1 // Filename: mathNumbers.cxx
2 // Created by: mike (24Sep99)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #include "mathNumbers.h"
16 #include <math.h>
17 
18 const double MathNumbers::pi_d = 4.0 * atan(1.0);
19 const double MathNumbers::ln2_d = log(2.0);
20 const double MathNumbers::rad_2_deg_d = 180.0 / MathNumbers::pi_d;
21 const double MathNumbers::deg_2_rad_d = MathNumbers::pi_d / 180.0;
22 
23 const float MathNumbers::pi_f = 4.0 * atan(1.0);
24 const float MathNumbers::ln2_f = log(2.0);
25 const float MathNumbers::rad_2_deg_f = 180.0 / MathNumbers::pi_d;
26 const float MathNumbers::deg_2_rad_f = MathNumbers::pi_d / 180.0;
27 
28 const PN_stdfloat MathNumbers::pi = 4.0 * atan(1.0);
29 const PN_stdfloat MathNumbers::ln2 = log(2.0);
30 const PN_stdfloat MathNumbers::rad_2_deg = 180.0 / MathNumbers::pi_d;
31 const PN_stdfloat MathNumbers::deg_2_rad = MathNumbers::pi_d / 180.0;
32