* \ingroup MITKTestingAPI * \brief Compare two scalar values for equality within a tolerance. * * \param[in] scalar1 Scalar value to compare. * \param[in] scalar2 Scalar value to compare. * \param[in] eps Tolerance for floating point comparison. * \param[in] verbose Flag indicating detailed console output. * \return True if scalars are equal within the given tolerance. */
| 69 | * \return True if scalars are equal within the given tolerance. |
| 70 | */ |
| 71 | inline bool Equal(ScalarType scalar1, ScalarType scalar2, ScalarType eps = mitk::eps, bool verbose = false) |
| 72 | { |
| 73 | bool isEqual(!DifferenceBiggerOrEqualEps(scalar1 - scalar2, eps)); |
| 74 | |
| 75 | ConditionalOutputOfDifference(scalar1, scalar2, eps, verbose, isEqual); |
| 76 | |
| 77 | return isEqual; |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | #endif |
nothing calls this directly
no test coverage detected