nux-0.9.46
|
00001 /* 00002 * Copyright 2010 Inalogic® Inc. 00003 * 00004 * This program is free software: you can redistribute it and/or modify it 00005 * under the terms of the GNU Lesser General Public License, as 00006 * published by the Free Software Foundation; either version 2.1 or 3.0 00007 * of the License. 00008 * 00009 * This program is distributed in the hope that it will be useful, but 00010 * WITHOUT ANY WARRANTY; without even the implied warranties of 00011 * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR 00012 * PURPOSE. See the applicable version of the GNU Lesser General Public 00013 * License for more details. 00014 * 00015 * You should have received a copy of both the GNU Lesser General Public 00016 * License along with this program. If not, see <http://www.gnu.org/licenses/> 00017 * 00018 * Authored by: Jay Taoko <jaytaoko@inalogic.com> 00019 * 00020 */ 00021 00022 00023 #ifndef CONSTANTS_H 00024 #define CONSTANTS_H 00025 00026 #include <limits> 00027 00028 /* 00029 PI with 500 decimals (from http://www.ex.ac.uk/cimt/general/pi10000.htm) 00030 00031 3.1415926535 8979323846 2643383279 5028841971 6939937510 00032 5820974944 5923078164 0628620899 8628034825 3421170679 00033 8214808651 3282306647 0938446095 5058223172 5359408128 00034 4811174502 8410270193 8521105559 6446229489 5493038196 00035 4428810975 6659334461 2847564823 3786783165 2712019091 00036 4564856692 3460348610 4543266482 1339360726 0249141273 00037 7245870066 0631558817 4881520920 9628292540 9171536436 00038 7892590360 0113305305 4882046652 1384146951 9415116094 00039 3305727036 5759591953 0921861173 8193261179 3105118548 00040 0744623799 6274956735 1885752724 8912279381 8301194912 00041 */ 00042 // 2.7182818284590452353602874713526624977572470936999595749669676277 00043 00044 00045 00046 namespace nux 00047 { 00048 00049 class Const 00050 { 00051 public: 00052 static const float pi; 00053 static const float Pi; 00054 static const float e; 00055 static const float sqrt2; 00056 static const float sqrt3; 00057 static const float golden; 00058 00059 static const double EpsilonMilli; 00060 static const double EpsilonMicro; 00061 static const double EpsilonNano; 00062 static const double EpsilonPico; 00063 static const double EpsilonFemto; 00064 00065 static const float flt_epsilon; 00066 static const float dbl_epsilon; 00067 00068 private: 00069 Const(); 00070 ~Const(); 00071 Const (const Const &); 00072 Const &operator = (const Const &); 00073 }; 00074 00075 } 00076 00077 #endif // CONSTANTS_H 00078