Table of Contents

Class VectorToleranceComparer

Namespace
NCalc.Domain
Assembly
NCalc.dll

Tolerance-based equality comparer for Vector. Two vectors are considered equal if every component pair differs by at most the tolerance.

public sealed class VectorToleranceComparer : IEqualityComparer<Vector>
Inheritance
VectorToleranceComparer
Implements
Inherited Members

Constructors

VectorToleranceComparer()

public VectorToleranceComparer()

VectorToleranceComparer(double)

public VectorToleranceComparer(double tolerance)

Parameters

tolerance double

Methods

Equals(Vector, Vector)

Determines whether the specified objects are equal.

public bool Equals(Vector a, Vector b)

Parameters

a Vector
b Vector

Returns

bool

true if the specified objects are equal; otherwise, false.

GetHashCode(Vector)

Returns a hash code for the specified object.

public int GetHashCode(Vector obj)

Parameters

obj Vector

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.