refactor: Equals methods to use equality operators on primitives
This commit is contained in:
@@ -307,7 +307,7 @@ public readonly struct Vector2D(float x, float y)
|
||||
/// </summary>
|
||||
/// <param name="obj">The object to compare with the current <see cref="Vector2D"/>.</param>
|
||||
/// <returns><see cref="true"/> if the specified object is equal to the current <see cref="Vector2D"/>; otherwise, <see cref="false"/>.</returns>
|
||||
public override bool Equals(object? obj) => obj is Vector2D vector2D && X.Equals(vector2D.X) && Y.Equals(vector2D.Y);
|
||||
public override bool Equals(object? obj) => obj is Vector2D vector2D && this == vector2D;
|
||||
|
||||
/// <summary>
|
||||
/// Generates a hash code for the <see cref="Vector2D"/>.
|
||||
|
||||
Reference in New Issue
Block a user