robotoc
robotoc - efficient ROBOT Optimal Control solvers
Loading...
Searching...
No Matches
numerics.hpp
Go to the documentation of this file.
1
#ifndef ROBOTOC_UTILS_NUMERICS_HPP_
2
#define ROBOTOC_UTILS_NUMERICS_HPP_
3
4
#include <cmath>
5
#include <limits>
6
7
namespace
robotoc
{
8
namespace
numerics {
9
10
inline
bool
isApprox
(
const
double
x,
const
double
y,
11
const
double
eps=std::sqrt(std::numeric_limits<double>::epsilon())) {
12
return
(std::fabs(x-y) < eps);
13
}
14
15
}
// namespace numerics
16
}
// namespace robotoc
17
18
#endif
// ROBOTOC_UTILS_NUMERICS_HPP_
robotoc::numerics::isApprox
bool isApprox(const double x, const double y, const double eps=std::sqrt(std::numeric_limits< double >::epsilon()))
Definition:
numerics.hpp:10
robotoc
Definition:
constraint_component_base.hpp:17
include
robotoc
utils
numerics.hpp
Generated by
1.9.5