Numerics Class

Summary

The Numerics class contains common operations on numeric values.
Namespace
TCLite.Constraints
Base Types
  • object
graph BT Type-->Base0["object"] Type["Numerics"] class Type type-node

Syntax

public class Numerics

Methods

Name Value Summary
AreEqual(decimal, decimal, Tolerance) bool
static
AreEqual(double, double, Tolerance) bool
static
AreEqual(float, float, Tolerance) bool
static
AreEqual(int, int, Tolerance) bool
static
AreEqual(long, long, Tolerance) bool
static
AreEqual(uint, uint, Tolerance) bool
static
AreEqual(ulong, ulong, Tolerance) bool
static
AreEqual<TExpected, TActual>(TExpected, TActual, Tolerance) bool
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.
static
Compare<TExpected, TActual>(TExpected, TActual) int
Compare two numeric values, performing the usual numeric conversions.
static
IsNumericType(Type) bool
Checks a Type, returning true if it is a numeric Type.
static
IsNumericType<T>(T) bool
Checks the type of the argument, returning true if the argument is a numeric type.
static