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