OdbDesign
OdbDesign ODB++ Parser - C++ library, gRPC/REST server, CLI, tests
Loading...
Searching...
No Matches
equals_within.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <cmath>
4
#include "
utils_export.h
"
5
6
namespace
Utils
7
{
8
template
<
class
R>
9
bool
equals_within
(
const
R a,
const
R b,
const
R epsilon = 0.001f)
10
{
11
return
std::abs(a - b) < epsilon;
12
}
13
14
UTILS_EXPORT
bool
float_equals
(
float
a,
float
b,
float
epsilon = 0.001f);
15
16
UTILS_EXPORT
bool
double_equals
(
double
a,
double
b,
double
epsilon = 0.001);
17
}
Utils
Definition
ArchiveExtractor.cpp:15
Utils::float_equals
bool float_equals(float a, float b, float epsilon)
Definition
equals_within.cpp:5
Utils::double_equals
bool double_equals(double a, double b, double epsilon)
Definition
equals_within.cpp:11
Utils::equals_within
bool equals_within(const R a, const R b, const R epsilon=0.001f)
Definition
equals_within.h:9
utils_export.h
UTILS_EXPORT
#define UTILS_EXPORT
Definition
utils_export.h:12
Utils
equals_within.h
Generated by
1.9.8