BWAPI
SPAR/AIModule/BWTA/vendors/CGAL/CGAL/Kinetic/internal/infinity_or_max.h
Go to the documentation of this file.
00001 // Copyright (c) 2005  Stanford University (USA).
00002 // All rights reserved.
00003 //
00004 // This file is part of CGAL (www.cgal.org); you can redistribute it and/or
00005 // modify it under the terms of the GNU Lesser General Public License as
00006 // published by the Free Software Foundation; version 2.1 of the License.
00007 // See the file LICENSE.LGPL distributed with CGAL.
00008 //
00009 // Licensees holding a valid commercial license may use this file in
00010 // accordance with the commercial license agreement provided with the software.
00011 //
00012 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00013 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00014 //
00015 // $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/branches/CGAL-3.5-branch/Kinetic_data_structures/include/CGAL/Kinetic/internal/infinity_or_max.h $
00016 // $Id: infinity_or_max.h 33416 2006-08-18 21:03:47Z afabri $
00017 // 
00018 //
00019 // Author(s)     : Daniel Russel <drussel@alumni.princeton.edu>
00020 
00021 #ifndef CGAL_KINETIC_INFINITY_OR_MAX_H
00022 #define CGAL_KINETIC_INFINITY_OR_MAX_H
00023 
00024 #include <limits>
00025 
00026 CGAL_KINETIC_BEGIN_INTERNAL_NAMESPACE
00027 template <class T>
00028 T infinity_or_max()
00029 {
00030     if (std::numeric_limits<T>::has_infinity) return std::numeric_limits<T>::infinity();
00031     else return (std::numeric_limits<T>::max)();
00032 }
00033 
00034 
00035 template <class T>
00036 T infinity_or_max(T)
00037 {
00038     if (std::numeric_limits<T>::has_infinity) return std::numeric_limits<T>::infinity();
00039     else return (std::numeric_limits<T>::max)();
00040 }
00041 
00042 
00043 CGAL_KINETIC_END_INTERNAL_NAMESPACE
00044 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines