From e17b24833b5baec2e7d38df4e2174802e561a6bd Mon Sep 17 00:00:00 2001 From: Dylan Wilson Date: Tue, 21 May 2019 21:29:58 +1000 Subject: [PATCH] fixed #604 unused parameter in equality check --- Source/MonoGame.Extended/Math/Angle.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Source/MonoGame.Extended/Math/Angle.cs b/Source/MonoGame.Extended/Math/Angle.cs index 6ade4842..19f48553 100644 --- a/Source/MonoGame.Extended/Math/Angle.cs +++ b/Source/MonoGame.Extended/Math/Angle.cs @@ -56,20 +56,20 @@ namespace MonoGame.Extended public float Degrees { - get { return Radians*_radianDegree; } - set { Radians = value*_degreeRadian; } + get => Radians*_radianDegree; + set => Radians = value*_degreeRadian; } public float Gradians { - get { return Radians*_radianGradian; } - set { Radians = value*_gradianRadian; } + get => Radians*_radianGradian; + set => Radians = value*_gradianRadian; } public float Revolutions { - get { return Radians*_tauInv; } - set { Radians = value*_tau; } + get => Radians*_tauInv; + set => Radians = value*_tau; } public Angle(float value, AngleType angleType = AngleType.Radian) @@ -162,7 +162,7 @@ namespace MonoGame.Extended public override bool Equals(object obj) { if (ReferenceEquals(null, obj)) return false; - return obj is Angle && Equals((Angle) obj); + return obj is Angle a && Equals(a); } public override int GetHashCode() @@ -188,12 +188,12 @@ namespace MonoGame.Extended public static bool operator ==(Angle a, Angle b) { - return a.Equals(a); + return a.Equals(b); } public static bool operator !=(Angle a, Angle b) { - return !a.Equals(a); + return !a.Equals(b); } public static Angle operator -(Angle left, Angle right)