ViennaSHE 1.3.0
Free open-source semiconductor device simulator using spherical harmonics expansions techniques.
viennashe::testing Namespace Reference

Functions

bool fuzzy_equal (double is, double should, double tol=1e-1)
 Performs a fuzzy (up to a tolerance) equal. Returns true if is and should are equal within the tolerance tol. More...
 

Function Documentation

◆ fuzzy_equal()

bool viennashe::testing::fuzzy_equal ( double  is,
double  should,
double  tol = 1e-1 
)
inline

Performs a fuzzy (up to a tolerance) equal. Returns true if is and should are equal within the tolerance tol.

Parameters
isThe value
shouldThe value is should be
tolThe tolerance
Returns
True if is == should within the tolerance tol, else false.

Definition at line 39 of file common.hpp.