FloatComparer
A float comparer used by Assert performing approximate comparison.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Class
- Namespace: UnityEngine.Assertions.Comparers
- Assembly: UnityEngine.CoreModule
- Implements: IEqualityComparer<float>
public class FloatComparer : IEqualityComparer<float>
Static Fields
Value | Description |
|---|---|
| kEpsilon | Default epsilon used by the comparer. |
| s_ComparerWithDefaultTolerance | Default instance of a comparer class with deafult error epsilon and absolute error check. |
Constructors
Constructor | Description |
|---|---|
| FloatComparer() | Creates an instance of the comparer. |
| FloatComparer(System.Boolean) | Creates an instance of the comparer. |
| FloatComparer(System.Single) | Creates an instance of the comparer. |
| FloatComparer(System.Single,System.Boolean) | Creates an instance of the comparer. |
Static Methods
Method | Description |
|---|---|
| AreEqual | Performs equality check with absolute error check. |
| AreEqualRelative | Performs equality check with relative error check. |