Quotes around otherwise ambiguous (underline containing) name
[geos.git] / include / geos / util / math.h
blob3a59d30a99c51cf8a9156f0a253e697cbac4c740
1 /**********************************************************************
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
6 * Copyright (C) 2001-2002 Vivid Solutions Inc.
7 * Copyright (C) 2006 Refractions Research Inc.
9 * This is free software; you can redistribute and/or modify it under
10 * the terms of the GNU Lesser General Public Licence as published
11 * by the Free Software Foundation.
12 * See the COPYING file for more information.
14 **********************************************************************/
16 #ifndef GEOS_UTIL_MATH_H
17 #define GEOS_UTIL_MATH_H
19 namespace geos { namespace util {
21 /// Symmetric Rounding Algorithm
22 double sym_round(double val);
24 /// Asymmetric Rounding Algorithm
25 double java_math_round(double val);
27 /// Equivalent to Java Math.rint()
28 double rint_vc(double val);
30 /// Default rounding method for GEOS
31 ///
32 /// @note Always use this rounding method, to easy easy switching
33 /// between different rounding method for the whole codebase.
34 inline double round(double val)
36 return java_math_round(val);
39 }} // namespace geos::util
41 #endif // GEOS_UTIL_MATH_H