using System.Collections; using System.Collections.Generic; using UnityEngine; namespace WorldStreamer2 { /// /// Vector3Int array comparer. /// public class Vector3IntArrayComparer : IEqualityComparer { /// /// Equals the specified x and y. /// /// The x coordinate. /// The y coordinate. public bool Equals(Vector3Int x, Vector3Int y) { if (x.x == y.x && x.y == y.y && x.z == y.z) { return true; } return false; } /// /// Gets the hash code. /// /// The hash code. /// Object. public int GetHashCode(Vector3Int obj) { int result = 17; unchecked { result = result * 23 + obj.x; result = result * 23 + obj.y; result = result * 23 + obj.z; } return result; } } }