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);Parameters
| Name | Type | Description |
|---|---|---|
expected | T | The expected value. |
precision | T | The maximum allowed difference between the value and the expected value. |
Returns
AssertionsChain<FloatingPointAssertions<T>, T>
An AssertionsChain<TAssertions, T> for chaining further assertions.