Vector.approxEqual

Approximated equality with controlable precision

struct Vector(T, size_t dim_)
nothrow @nogc pure const
bool
approxEqual
()
(
auto ref const Vector rhs
,
T maxRelDiff = 1e-2
,
T maxAbsDiff = 1e-05
)
if (
__traits(isFloating, T)
)

Parameters

rhs Vector

Vector to compare with this vector

maxRelDiff T

Maximun relative difference

maxAbsDiff T

Maximun absolute difference

See: std.math : approxEqual

Meta