Fix adjoint unit test: test_isApproxWithRef works for positive quantities only.

This commit is contained in:
Gael Guennebaud
2013-07-15 21:21:14 +02:00
parent c76990664b
commit d02e329218
2 changed files with 3 additions and 1 deletions

View File

@@ -270,6 +270,7 @@ inline bool test_isApprox(const Type1& a, const Type2& b)
// The idea behind this function is to compare the two scalars a and b where
// the scalar ref is a hint about the expected order of magnitude of a and b.
// WARNING: the scalar a and b must be positive
// Therefore, if for some reason a and b are very small compared to ref,
// we won't issue a false negative.
// This test could be: abs(a-b) <= eps * ref