eq_approx

bool
eq_approx
pure
(
A
B
E
)
(
in A a
,
in B b
,
in E eps
)
if (
allSatisfy!(isNumeric, A, B, E) ||
allSatisfy!(isElemHandler, A, B)
)

Examples

assert(  eq_approx( [1.1f,2,3], [1,2,3], 0.2 ) );
assert( !eq_approx( [1.1f,2,3], [1,2,3], 0.1 ) );
assert( !eq_approx( [1.0f,2], [1,2,3], 1 ) );

Meta