|
Celeritas 0.7.0-dev.194+develop.0df4cab59
|
Functor for comparing values to zero with an absolute precision. More...
#include <SoftEqual.hh>
Public Types | |
Type aliases | |
| using | argument_type = RealType |
| using | value_type = RealType |
Public Member Functions | |
| CELER_CONSTEXPR_FUNCTION | SoftZero () |
| Construct with default absolute precision. | |
| CELER_FUNCTION | SoftZero (value_type abs) |
| Construct with absolute precision. | |
| CELER_FUNCTION bool | operator() (value_type actual) const |
| See if the value is within absolute tolerance of zero. | |
| CELER_CONSTEXPR_FUNCTION value_type | abs () const |
| Absolute tolerance. | |
Functor for comparing values to zero with an absolute precision.
|
explicit |
Construct with absolute precision.
| abs | threshold for absolute error (default 1.0e-14 for doubles) |
|
inline |
See if the value is within absolute tolerance of zero.
| actual | scalar floating point value |