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
7namespace robotoc {
8namespace numerics {
9
10inline 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_
bool isApprox(const double x, const double y, const double eps=std::sqrt(std::numeric_limits< double >::epsilon()))
Definition: numerics.hpp:10
Definition: constraint_component_base.hpp:17