diff --git a/gtsam/base/Vector.h b/gtsam/base/Vector.h index bd72a0473..81be36c0a 100644 --- a/gtsam/base/Vector.h +++ b/gtsam/base/Vector.h @@ -80,9 +80,14 @@ static_assert( * Numerically stable function for comparing if floating point values are equal * within epsilon tolerance. * Used for vector and matrix comparison with C++11 compatible functions. - * Return true if two numbers are close wrt epsilon. + * + * If either value is NaN or Inf, we check for both values to be NaN or Inf + * respectively for the comparison to be true. + * If one is NaN/Inf and the other is not, returns false. + * + * Return true if two numbers are close wrt tol. */ -GTSAM_EXPORT bool fpEqual(double a, double b, double epsilon); +GTSAM_EXPORT bool fpEqual(double a, double b, double tol); /** * print without optional string, must specify cout yourself