Template Function mrpt::math::approximatelyEqual(T1, T1, T2)

Function Documentation

template<class T1, class T2>
bool mrpt::math::approximatelyEqual(T1 a, T1 b, T2 epsilon)

Compare 2 floats and determine whether they are equal.

Parameters:
  • a – Fist num

  • b – Second num

  • epsilon – Difference below which a, b are considered equal

Returns:

True if equal, false otherwise