C# Class PclUnit.Constraints.Pieces.Tolerance

The Tolerance class generalizes the notion of a tolerance within which an equality test succeeds. Normally, it is used with numeric types, but it can be used with any type that supports taking a difference between two objects and comparing that difference to a value.
Show file Open project: jbtule/PclUnit Class Usage Examples

Public Methods

Method Description
Tolerance ( object amount ) : System

Constructs a linear tolerance of a specdified amount

Tolerance ( object amount, ToleranceMode mode ) : System

Constructs a tolerance given an amount and ToleranceMode

Private Methods

Method Description
CheckLinearAndNumeric ( ) : void

Tests that the current Tolerance is linear with a numeric value, throwing an exception if it is not.

Method Details

Tolerance() public method

Constructs a linear tolerance of a specdified amount
public Tolerance ( object amount ) : System
amount object
return System

Tolerance() public method

Constructs a tolerance given an amount and ToleranceMode
public Tolerance ( object amount, ToleranceMode mode ) : System
amount object
mode ToleranceMode
return System