mathNumbers.I 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // Filename: mathNumbers.I
  2. // Created by: drose (22Jan05)
  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. // Function: MathNumbers::cpi
  16. // Access: Public, Static
  17. // Description: Returns pi as a single-precision or double-precision
  18. // number, according to the type of the parameter.
  19. ////////////////////////////////////////////////////////////////////
  20. INLINE float MathNumbers::
  21. cpi(float) {
  22. return pi_f;
  23. }
  24. ////////////////////////////////////////////////////////////////////
  25. // Function: MathNumbers::cln2
  26. // Access: Public, Static
  27. // Description: Returns ln(2) as a single-precision or double-precision
  28. // number, according to the type of the parameter.
  29. ////////////////////////////////////////////////////////////////////
  30. INLINE float MathNumbers::
  31. cln2(float) {
  32. return ln2_f;
  33. }
  34. ////////////////////////////////////////////////////////////////////
  35. // Function: MathNumbers::cpi
  36. // Access: Public, Static
  37. // Description: Returns pi as a single-precision or double-precision
  38. // number, according to the type of the parameter.
  39. ////////////////////////////////////////////////////////////////////
  40. INLINE double MathNumbers::
  41. cpi(double) {
  42. return pi;
  43. }
  44. ////////////////////////////////////////////////////////////////////
  45. // Function: MathNumbers::cln2
  46. // Access: Public, Static
  47. // Description: Returns ln(2) as a single-precision or double-precision
  48. // number, according to the type of the parameter.
  49. ////////////////////////////////////////////////////////////////////
  50. INLINE double MathNumbers::
  51. cln2(double) {
  52. return ln2;
  53. }