1 /* pi.h 2 Copyright (c) 2014 by Michael Zahniser 3 4 Endless Sky is free software: you can redistribute it and/or modify it under the 5 terms of the GNU General Public License as published by the Free Software 6 Foundation, either version 3 of the License, or (at your option) any later version. 7 8 Endless Sky is distributed in the hope that it will be useful, but WITHOUT ANY 9 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 10 PARTICULAR PURPOSE. See the GNU General Public License for more details. 11 */ 12 13 #ifndef PI_H_ 14 #define PI_H_ 15 16 17 18 // Constants to replace M_PI (which is not available on all operating systems). 19 const double PI = 3.14159265358979323846; 20 const double TO_RAD = PI / 180.; 21 const double TO_DEG = 180. / PI; 22 23 24 25 #endif 26