Mercator
iround.h
00001 // This file may be redistributed and modified only under the terms of
00002 // the GNU General Public License (See COPYING for details).
00003 // Copyright (C) 2003 Alistair Riddoch
00004 
00005 #ifndef MERCATOR_IROUND_H
00006 #define MERCATOR_IROUND_H
00007 
00008 //MSVC 11.0 doesn't support std::lround so we'll use boost. When MSVC gains support for std::lround this could be removed.
00009 #ifdef _MSC_VER
00010 #include <boost/math/special_functions/round.hpp>
00011 #define I_ROUND(_x) (boost::math::lround(_x))
00012 #else
00013 #include <cmath>
00014 #define I_ROUND(_x) (std::lround(_x))
00015 #endif
00016 
00017 #endif // MERCATOR_IROUND_H