added documentation to fpEqual on behavior for NaNs/Infs
parent
0a91c081fb
commit
b5e975f7e4
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue