FloatComparer
A float comparer used by Assert performing approximate comparison.
읽는 시간 1분최근 업데이트: 24일 전
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 default 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. |