#include "vtkABINamespace.h"
#include <cmath>
#include <limits>
#include <tuple>
#include <type_traits>
Go to the source code of this file.
|
template<class A > |
bool | vtkMathUtilities::FuzzyCompare (A a, A b, A epsilon=std::numeric_limits< A >::epsilon()) |
| Perform a fuzzy compare of floats/doubles, specify the allowed tolerance NB: this uses an absolute tolerance.
|
|
template<class A > |
A | vtkMathUtilities::SafeDivision (A a, A b) |
| Performs safe division that catches overflow and underflow.
|
|
template<class A > |
bool | vtkMathUtilities::NearlyEqual (A a, A b, A tol=std::numeric_limits< A >::epsilon()) |
| A slightly different fuzzy comparator that checks if two values are "nearly" equal based on Knuth, "The Art of Computer Programming (vol II)" NB: this uses a relative tolerance.
|
|
template<class A > |
void | vtkMathUtilities::UpdateRangeImpl (A &min0, A &max0, const A &value) |
| Update an existing min - max range with a new prospective value.
|
|
template<class A > |
void | vtkMathUtilities::UpdateRange (A &min0, A &max0, const A &value, typename std::enable_if<!std::is_floating_point< A >::value >::type *=nullptr) |
|
template<class A > |
void | vtkMathUtilities::UpdateRange (A &min0, A &max0, const A &value, typename std::enable_if< std::is_floating_point< A >::value >::type *=nullptr) |
|