Abs.hh

00001 /**********************************************************************
00002  * blaRAY -- photon mapper/raytracer
00003  * (C) 2008 by Tomasz bla Fortuna <bla@thera.be>, <bla@af.gliwice.pl>
00004  *
00005  * This program is free software: you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation, either version 3 of the License, or
00008  * any later version.
00009  *
00010  * See Docs/LICENSE
00011  *********************/
00012 
00013 #ifndef _ABS_H_
00014 #define _ABS_H_
00015 
00016 namespace Math {
00018         template<typename T>
00019         inline T Abs(T arg) {
00020                 if (arg < 0)
00021                         return -arg;
00022                 return arg;
00023         }
00024 }
00025 
00026 #endif

Generated on Wed Mar 12 00:34:58 2008 for blaRAY by  doxygen 1.5.5