shouldApproxEqual

Undocumented in source. Be warned that the author may not have intended to support it.
void
shouldApproxEqual
(
V
E
)
(
in V value
,,
double maxRelDiff = 1e-2
,
double maxAbsDiff = 1e-5
,
string file = __FILE__
,
size_t line = __LINE__
)
if (
!isObject!V &&
(
isFloatingPoint!V ||
isFloatingPoint!E
)
&&
is(typeof(value == expected) == bool)
)

Examples

1.0.shouldApproxEqual(1.0001);

Meta