Class ColorEqualityComparer
Use this class to compare two Color objects. ColorEqualityComparer.Instance has default calculation error value set to 0.01f. To set a test specific error value instantiate a comparer instance using the one argument constructor.
상속된 멤버
네임스페이스: UnityEngine.TestTools.Utils
어셈블리: solution.dll
구문
public class ColorEqualityComparer : IEqualityComparer<Color>
생성자
이름 | 설명 |
---|---|
ColorEqualityComparer(float) | Creates an instance of the comparer with a custom error value. |
프로퍼티
이름 | 설명 |
---|---|
Instance | A singleton instance of the comparer with a default error value set to 0.01f. |
메서드
이름 | 설명 |
---|---|
Equals(Color, Color) | Compares the actual and expected Color objects for equality using AreFloatsEqualAbsoluteError(float, float, float) to compare the RGB and Alpha attributes of Color. Returns true if expected and actual objects are equal otherwise, it returns false. |
GetHashCode(Color) | Serves as the default hash function. |