Vector3ComparerWithEqualsOperator.cs 650 B

12345678910111213141516171819202122
  1. using System.Collections.Generic;
  2. namespace UnityEngine.TestTools.Utils
  3. {
  4. public class Vector3ComparerWithEqualsOperator : IEqualityComparer<Vector3>
  5. {
  6. private static readonly Vector3ComparerWithEqualsOperator m_Instance = new Vector3ComparerWithEqualsOperator();
  7. public static Vector3ComparerWithEqualsOperator Instance { get { return m_Instance; } }
  8. private Vector3ComparerWithEqualsOperator() {}
  9. public bool Equals(Vector3 expected, Vector3 actual)
  10. {
  11. return expected == actual;
  12. }
  13. public int GetHashCode(Vector3 vec3)
  14. {
  15. return 0;
  16. }
  17. }
  18. }