Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

rtmath.h

Go to the documentation of this file.
00001 /*
00002  * rtmath.h
00003  * 
00004  * Copyright (c) 2000-2004 by Florian Fischer (florianfischer@gmx.de)
00005  * and Martin Trautmann (martintrautmann@gmx.de) 
00006  * 
00007  * This file may be distributed and/or modified under the terms of the 
00008  * GNU General Public License version 2 as published by the Free Software 
00009  * Foundation. 
00010  * 
00011  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00012  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00013  * 
00014  */
00015 
00022 #ifndef __LRT_MATH__
00023 #define __LRT_MATH__
00024 
00025 namespace lrt {
00026 
00031 class Math  
00032 {
00033 public:
00035         static const int MAX_INT;
00037         static const int MIN_INT;
00038 
00040         static const double PI;
00043         static const double E;
00044 
00045         
00049         static inline int max(int num1, int num2);
00053         static inline int min(int num1, int num2);
00057         static inline int abs(int num);
00058 
00064         static int rand(int from, int to);
00065 
00069         static void seed(unsigned long seed);
00070 
00074         static void randomize();
00075 
00076 
00078         static double sqrt(double num);
00079         static double log10(double num);
00080         static double ln(double num);
00081         static double exp(double num);
00082         static double sin(double num);
00083         static double cos(double num);
00084         static double tan(double num);
00085 
00086 private:
00087         static bool randomInit;
00088         Math();
00089         ~Math();
00090 };
00091 
00092 } // namespace
00093 
00094 
00095 #include "rtmath.inline.cpp"
00096 
00097 #endif
00098 

This is the RoboTour API documentation version 0.1 • Copyright (C) by Florian Fischer