Mercator
iround.h
1 // This file may be redistributed and modified only under the terms of
2 // the GNU General Public License (See COPYING for details).
3 // Copyright (C) 2003 Alistair Riddoch
4 
5 #ifndef MERCATOR_IROUND_H
6 #define MERCATOR_IROUND_H
7 
8 //MSVC 11.0 doesn't support std::lround so we'll use boost. When MSVC gains support for std::lround this could be removed.
9 #ifdef _MSC_VER
10 #include <boost/math/special_functions/round.hpp>
11 #define I_ROUND(_x) (boost::math::lround(_x))
12 #else
13 #include <cmath>
14 #define I_ROUND(_x) (std::lround(_x))
15 #endif
16 
17 #endif // MERCATOR_IROUND_H