Update code

This commit is contained in:
2023-11-21 11:24:34 +01:00
parent 816e38e9e4
commit f07fb8829b
12 changed files with 522 additions and 343 deletions

View File

@@ -8,7 +8,8 @@
* @brief A small test library.
*
* @details This a small testing library that is tailored for the needs of the
* project.
* project. Anything that is in the details namespace should not be used
* directly, or else it might cause undefined behavior if not used correctly.
*
* @bug No known bugs
* */
@@ -90,7 +91,7 @@ template <class T,
class = typename std::enable_if<std::is_arithmetic<T>::value>::type>
static bool close_to(T a, T b, double tol = 1e-8)
{
return std::abs(a - b) < tol;
return std::fabs(a - b) < tol;
}
/** @brief Test if two armadillo matrices/vectors are equal.