pi.h

Go to the documentation of this file.
00001 
00006 /*
00007  Copyright (C) 2001-2006, William Joseph.
00008  All Rights Reserved.
00009 
00010  This file is part of GtkRadiant.
00011 
00012  GtkRadiant is free software; you can redistribute it and/or modify
00013  it under the terms of the GNU General Public License as published by
00014  the Free Software Foundation; either version 2 of the License, or
00015  (at your option) any later version.
00016 
00017  GtkRadiant is distributed in the hope that it will be useful,
00018  but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020  GNU General Public License for more details.
00021 
00022  You should have received a copy of the GNU General Public License
00023  along with GtkRadiant; if not, write to the Free Software
00024  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00025  */
00026 
00027 #if !defined(INCLUDED_MATH_PI_H)
00028 #define INCLUDED_MATH_PI_H
00029 
00030 const double c_pi = 3.1415926535897932384626433832795;
00031 const double c_half_pi = c_pi / 2;
00032 const double c_2pi = 2 * c_pi;
00033 const double c_inv_2pi = 1 / c_2pi;
00034 
00035 const double c_DEG2RADMULT = c_pi / 180.0;
00036 const double c_RAD2DEGMULT = 180.0 / c_pi;
00037 
00038 inline double radians_to_degrees (double radians)
00039 {
00040     return radians * c_RAD2DEGMULT;
00041 }
00042 inline double degrees_to_radians (double degrees)
00043 {
00044     return degrees * c_DEG2RADMULT;
00045 }
00046 
00047 #endif

Generated by  doxygen 1.6.2