Vector2ComparerWithEqualsOperator.cs 650 B

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