Math.hpp

Go to the documentation of this file.
00001 
00002 //                                                                           //
00003 // Copyright 1998-2000 by Janne Kontkanen. All Rights reserved. Usage or     //
00004 // redistribution of this material in source or binary form is prohibited    //
00005 // unless otherwise agreed.                                                  //
00006 //                                                                           //
00008 
00009 // Common math functions
00010 
00011 #ifndef _MATH_HPP
00012 #define _MATH_HPP
00013 
00014 #ifndef __sgi
00015 #include <cmath>
00016 #include <cstdlib>
00017 #else
00018 #include <math.h>
00019 #include <stdlib.h>
00020 #endif
00021 
00022 #ifdef PLATFORM_NO_ABS_FUNCTION
00023 float abs(float f)
00024 {
00025   return fabs(f);
00026 }
00027 #endif
00028 
00029 inline float urand()
00030 {
00031   return (float)rand()/RAND_MAX;
00032 }
00033 
00034 const float pi = 3.141592f;
00035 
00036 #endif // #ifndef _MATH_HPP

Generated on Mon Mar 12 21:09:00 2007 for VEE - The Visual Effects Engine by  doxygen 1.4.6