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
xVector2DThe first object of the parameter type to be compared.
yVector2DThe second object of the parameter type to be compared.
Returns
- bool
trueif 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
xVector2DIntThe first object of the parameter type to be compared.
yVector2DIntThe second object of the parameter type to be compared.
Returns
- bool
trueif 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
xVector3DThe first object of the parameter type to be compared.
yVector3DThe second object of the parameter type to be compared.
Returns
- bool
trueif 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
xVector3DIntThe first object of the parameter type to be compared.
yVector3DIntThe second object of the parameter type to be compared.
Returns
- bool
trueif 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
xVector4DThe first object of the parameter type to be compared.
yVector4DThe second object of the parameter type to be compared.
Returns
- bool
trueif 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
xobjectThe first object of the parameter type to be compared.
yobjectThe second object of the parameter type to be compared.
Returns
- bool
trueif 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
objVector2DIntThe 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
objVector3DIntThe 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.