IGLib
1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
|
The Numerics class contains common operations on numeric _values. More...
Static Public Member Functions | |
static bool | IsNumericType (Object obj) |
Checks the type of the object, returning true if the object is a numeric type. More... | |
static bool | IsFloatingPointNumeric (Object obj) |
Checks the type of the object, returning true if the object is a floating point numeric type. More... | |
static bool | IsFixedPointNumeric (Object obj) |
Checks the type of the object, returning true if the object is a fixed point numeric type. More... | |
static bool | AreEqual (object expected, object actual, ref Tolerance tolerance) |
Test two numeric _values for equality, performing the usual numeric conversions and using a provided or default tolerance. If the tolerance provided is Empty, this method may set it to a default tolerance. More... | |
static int | Compare (object expected, object actual) |
Compare two numeric _values, performing the usual numeric conversions. More... | |
Private Member Functions | |
Numerics () | |
Static Private Member Functions | |
static bool | AreEqual (double expected, double actual, ref Tolerance tolerance) |
static bool | AreEqual (float expected, float actual, ref Tolerance tolerance) |
static bool | AreEqual (decimal expected, decimal actual, Tolerance tolerance) |
static bool | AreEqual (ulong expected, ulong actual, Tolerance tolerance) |
static bool | AreEqual (long expected, long actual, Tolerance tolerance) |
static bool | AreEqual (uint expected, uint actual, Tolerance tolerance) |
static bool | AreEqual (int expected, int actual, Tolerance tolerance) |
The Numerics class contains common operations on numeric _values.
|
inlineprivate |
|
inlinestatic |
Checks the type of the object, returning true if the object is a numeric type.
obj | The object to check |
Referenced by NUnit.Framework.Constraints.Tolerance.CheckLinearAndNumeric(), and NUnit.Framework.Constraints.NUnitComparer.Compare().
|
inlinestatic |
Checks the type of the object, returning true if the object is a floating point numeric type.
obj | The object to check |
|
inlinestatic |
Checks the type of the object, returning true if the object is a fixed point numeric type.
obj | The object to check |
|
inlinestatic |
Test two numeric _values for equality, performing the usual numeric conversions and using a provided or default tolerance. If the tolerance provided is Empty, this method may set it to a default tolerance.
expected | The expected value |
actual | The actual value |
tolerance | A reference to the tolerance in effect |
Referenced by NUnit.Framework.Constraints.NumericsTests.CanMatchDecimalWithoutToleranceMode(), NUnit.Framework.Constraints.NumericsTests.CanMatchDecimalWithPercentage(), NUnit.Framework.Constraints.NumericsTests.CanMatchIntegralsWithPercentage(), NUnit.Framework.Constraints.NumericsTests.CanMatchWithoutToleranceMode(), NUnit.Framework.Constraints.NumericsTests.FailsOnDecimalAbovePercentage(), NUnit.Framework.Constraints.NumericsTests.FailsOnDecimalBelowPercentage(), and NUnit.Framework.Constraints.NumericsTests.FailsOnIntegralsOutsideOfPercentage().
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestatic |
Compare two numeric _values, performing the usual numeric conversions.
expected | The expected value |
actual | The actual value |
Referenced by NUnit.Framework.Constraints.NUnitComparer.Compare().