Kea
1.9.9-git
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
doubles.h
Go to the documentation of this file.
1
// Copyright (C) 2019 Internet Systems Consortium, Inc. ("ISC")
2
//
3
// This Source Code Form is subject to the terms of the Mozilla Public
4
// License, v. 2.0. If a copy of the MPL was not distributed with this
5
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7
#ifndef DOUBLES_H
8
#define DOUBLES_H
9
10
#include <complex>
11
12
namespace
isc
{
13
namespace
util {
14
22
inline
bool
areDoublesEquivalent
(
double
a,
double
b,
double
tolerance=0.000001) {
23
return
(std::abs(a - b) < tolerance);
24
}
25
26
}
// namespace util
27
}
// namespace isc
28
29
#endif // DOUBLES_H
isc::util::areDoublesEquivalent
bool areDoublesEquivalent(double a, double b, double tolerance=0.000001)
Tests two doubles for equivalence within a given tolerance.
Definition:
doubles.h:22
isc
Defines the logger used by the top-level component of kea-dhcp-ddns.
Definition:
agent_parser.cc:143
src
lib
util
doubles.h
Generated on Wed Sep 15 2021 10:48:30 for Kea by
1.8.9.1