MCPcopy Create free account
hub / github.com/MITK/MITK / Equal

Function Equal

Modules/Core/include/mitkEqual.h:71–78  ·  view source on GitHub ↗

* \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. */

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

Tested by

no test coverage detected