Skip to content

FloatingPointAssertions<T>.BeApproximately Method ​

Definition ​

Asserts that the floating-point value is approximately equal to the expected value within the specified precision.

c#
public AssertionsChain<FloatingPointAssertions<T>, T> BeApproximately(T expected, T precision);

View source

Parameters ​

NameTypeDescription
expectedTThe expected value.
precisionTThe maximum allowed difference between the value and the expected value.

Returns ​

AssertionsChain<FloatingPointAssertions<T>, T>

An AssertionsChain<TAssertions, T> for chaining further assertions.