Struct VectorEqualityComparer
- Namespace
- Cobilas.GodotEngine.Utility.Numerics
- Assembly
- com.cobilas.godot.utility.dll
Defines methods to support comparing vectors for equality.
public readonly struct VectorEqualityComparer : IEqualityComparer, IEqualityComparer<Vector2D>, IEqualityComparer<Vector3D>, IEqualityComparer<Vector4D>, IEqualityComparer<Vector2DInt>, IEqualityComparer<Vector3DInt>
- Implements
- Inherited Members
Methods
Equals(Vector2D, Vector2D)
Determines whether the specified objects are equal.
public bool Equals(Vector2D x, Vector2D y)
Parameters
x
Vector2DThe first object of the parameter type to be compared.
y
Vector2DThe second object of the parameter type to be compared.
Returns
- bool
true
if the specified objects are equal; otherwise,false
.
Remarks
Implement this method to provide a custom equality comparison for the specified type.
Equals(Vector2DInt, Vector2DInt)
Determines whether the specified objects are equal.
public bool Equals(Vector2DInt x, Vector2DInt y)
Parameters
x
Vector2DIntThe first object of the parameter type to be compared.
y
Vector2DIntThe second object of the parameter type to be compared.
Returns
- bool
true
if the specified objects are equal; otherwise,false
.
Remarks
Implement this method to provide a custom equality comparison for the specified type.
Equals(Vector3D, Vector3D)
Determines whether the specified objects are equal.
public bool Equals(Vector3D x, Vector3D y)
Parameters
x
Vector3DThe first object of the parameter type to be compared.
y
Vector3DThe second object of the parameter type to be compared.
Returns
- bool
true
if the specified objects are equal; otherwise,false
.
Remarks
Implement this method to provide a custom equality comparison for the specified type.
Equals(Vector3DInt, Vector3DInt)
Determines whether the specified objects are equal.
public bool Equals(Vector3DInt x, Vector3DInt y)
Parameters
x
Vector3DIntThe first object of the parameter type to be compared.
y
Vector3DIntThe second object of the parameter type to be compared.
Returns
- bool
true
if the specified objects are equal; otherwise,false
.
Remarks
Implement this method to provide a custom equality comparison for the specified type.
Equals(Vector4D, Vector4D)
Determines whether the specified objects are equal.
public bool Equals(Vector4D x, Vector4D y)
Parameters
x
Vector4DThe first object of the parameter type to be compared.
y
Vector4DThe second object of the parameter type to be compared.
Returns
- bool
true
if the specified objects are equal; otherwise,false
.
Remarks
Implement this method to provide a custom equality comparison for the specified type.
Equals(object, object)
Determines whether the specified objects are equal.
public bool Equals(object x, object y)
Parameters
x
objectThe first object of the parameter type to be compared.
y
objectThe second object of the parameter type to be compared.
Returns
- bool
true
if the specified objects are equal; otherwise,false
.
Remarks
Implement this method to provide a custom equality comparison for the specified type.
GetHashCode(Vector2D)
Returns a hash code for the specified object.
public int GetHashCode(Vector2D obj)
Parameters
Returns
- int
A hash code for the specified object.
Remarks
Implement this method to provide a customized hash code for type, corresponding to the customized equality comparison provided by the Equals method.
GetHashCode(Vector2DInt)
Returns a hash code for the specified object.
public int GetHashCode(Vector2DInt obj)
Parameters
obj
Vector2DIntThe object for which a hash code is to be returned.
Returns
- int
A hash code for the specified object.
Remarks
Implement this method to provide a customized hash code for type, corresponding to the customized equality comparison provided by the Equals method.
GetHashCode(Vector3D)
Returns a hash code for the specified object.
public int GetHashCode(Vector3D obj)
Parameters
Returns
- int
A hash code for the specified object.
Remarks
Implement this method to provide a customized hash code for type, corresponding to the customized equality comparison provided by the Equals method.
GetHashCode(Vector3DInt)
Returns a hash code for the specified object.
public int GetHashCode(Vector3DInt obj)
Parameters
obj
Vector3DIntThe object for which a hash code is to be returned.
Returns
- int
A hash code for the specified object.
Remarks
Implement this method to provide a customized hash code for type, corresponding to the customized equality comparison provided by the Equals method.
GetHashCode(Vector4D)
Returns a hash code for the specified object.
public int GetHashCode(Vector4D obj)
Parameters
Returns
- int
A hash code for the specified object.
Remarks
Implement this method to provide a customized hash code for type, corresponding to the customized equality comparison provided by the Equals method.
GetHashCode(object)
Returns a hash code for the specified object.
public int GetHashCode(object obj)
Parameters
Returns
- int
A hash code for the specified object.
Remarks
Implement this method to provide a customized hash code for type, corresponding to the customized equality comparison provided by the Equals method.