Math.hpp

Go to the documentation of this file.
00001 /* COPYRIGHT
00002  *
00003  * This file is part of the Simple Object Loader and Renderer - SOLAR
00004  *
00005  * Read the file "SOLAR-LICENSE" for the license.
00006  *
00007  * Authors & Copyright:
00008  *
00009  * Tommi Ilmonen, 2001-2003, except LWO-code by RJ, 2001-2003
00010  *
00011  * Tommi's email: firstname.lastname@hut.fi
00012  *
00013  */
00014 
00015 #ifndef SOLAR_MATH_HPP
00016 #define SOLAR_MATH_HPP
00017 
00018 namespace Solar {
00019 
00020 
00021 inline float Min(float x1, float x2)
00022 {
00023   return (x1 < x2) ? x1 : x2;
00024 }
00025 
00026 inline float Min(double x1, double x2)
00027 {
00028   return (x1 < x2) ? x1 : x2;
00029 }
00030 
00031 inline float Min(int x1, int x2)
00032 {
00033   return (x1 < x2) ? x1 : x2;
00034 }
00035 
00036 inline float Max(float x1, float x2)
00037 {
00038   return (x1 > x2) ? x1 : x2;
00039 }
00040 
00041 inline float Max(double x1, double x2)
00042 {
00043   return (x1 > x2) ? x1 : x2;
00044 }
00045 
00046 inline float Max(int x1, int x2)
00047 {
00048   return (x1 > x2) ? x1 : x2;
00049 }
00050 
00051 } // namespace Solar
00052 
00053 #endif

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