GEOS
3.12.0
include
geos
util
math.h
1
/**********************************************************************
2
*
3
* GEOS - Geometry Engine Open Source
4
* http://geos.osgeo.org
5
*
6
* Copyright (C) 2001-2002 Vivid Solutions Inc.
7
* Copyright (C) 2006 Refractions Research Inc.
8
*
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.
13
*
14
**********************************************************************/
15
16
#pragma once
17
18
namespace
geos
{
19
namespace
util {
20
22
double
sym_round
(
double
val);
23
25
double
java_math_round
(
double
val);
26
28
double
rint_vc
(
double
val);
29
30
35
inline
double
36
round
(
double
val)
37
{
38
return
java_math_round
(val);
39
}
40
42
double
clamp
(
double
x,
double
min,
double
max);
43
44
}
45
}
// namespace geos::util
geos::util::rint_vc
double rint_vc(double val)
Equivalent to Java Math.rint()
geos
Basic namespace for all GEOS functionalities.
Definition:
Angle.h:25
geos::util::java_math_round
double java_math_round(double val)
Asymmetric Rounding Algorithm.
geos::util::clamp
double clamp(double x, double min, double max)
Equivalent to std::clamp() in C++17.
geos::util::sym_round
double sym_round(double val)
Symmetric Rounding Algorithm.
geos::util::round
double round(double val)
Definition:
math.h:36
Generated by
1.8.20