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