diff --git a/Source/Engine/Core/Math/BoundingBox.cs b/Source/Engine/Core/Math/BoundingBox.cs index e87244797..fe65f5f51 100644 --- a/Source/Engine/Core/Math/BoundingBox.cs +++ b/Source/Engine/Core/Math/BoundingBox.cs @@ -678,7 +678,7 @@ namespace FlaxEngine [MethodImpl(MethodImplOptions.AggressiveInlining)] public bool Equals(in BoundingBox other) { - return Minimum == other.Minimum && Maximum == other.Maximum; + return Minimum.Equals(other.Minimum) && Maximum.Equals(other.Maximum); } /// diff --git a/Source/Engine/Core/Math/BoundingFrustum.cs b/Source/Engine/Core/Math/BoundingFrustum.cs index 5d86bdc2a..c08adf700 100644 --- a/Source/Engine/Core/Math/BoundingFrustum.cs +++ b/Source/Engine/Core/Math/BoundingFrustum.cs @@ -131,7 +131,7 @@ namespace FlaxEngine [MethodImpl(MethodImplOptions.AggressiveInlining)] public bool Equals(in BoundingFrustum other) { - return pMatrix == other.pMatrix; + return pMatrix.Equals(other.pMatrix); } /// diff --git a/Source/Engine/Core/Math/BoundingSphere.cs b/Source/Engine/Core/Math/BoundingSphere.cs index a618da5a6..8fe2ca618 100644 --- a/Source/Engine/Core/Math/BoundingSphere.cs +++ b/Source/Engine/Core/Math/BoundingSphere.cs @@ -492,7 +492,7 @@ namespace FlaxEngine [MethodImpl(MethodImplOptions.AggressiveInlining)] public bool Equals(in BoundingSphere other) { - return Center == other.Center && Radius == other.Radius; + return Center.Equals(other.Center) && Radius.Equals(other.Radius); } /// diff --git a/Source/Engine/Core/Math/Color.cs b/Source/Engine/Core/Math/Color.cs index 7d9071b4c..6ec51ce3e 100644 --- a/Source/Engine/Core/Math/Color.cs +++ b/Source/Engine/Core/Math/Color.cs @@ -210,7 +210,7 @@ namespace FlaxEngine [MethodImpl(MethodImplOptions.AggressiveInlining)] public bool Equals(in Color other) { - return R == other.R && G == other.G && B == other.B && A == other.A; + return R.Equals(other.R) && G.Equals(other.G) && B.Equals(other.B) && A.Equals(other.A); } /// diff --git a/Source/Engine/Core/Math/Double2.cs b/Source/Engine/Core/Math/Double2.cs index 248cae252..09a837dab 100644 --- a/Source/Engine/Core/Math/Double2.cs +++ b/Source/Engine/Core/Math/Double2.cs @@ -1582,7 +1582,7 @@ namespace FlaxEngine [MethodImpl(MethodImplOptions.AggressiveInlining)] public bool Equals(in Double2 other) { - return X == other.X && Y == other.Y; + return X.Equals(other.X) && Y.Equals(other.Y); } /// diff --git a/Source/Engine/Core/Math/Double3.cs b/Source/Engine/Core/Math/Double3.cs index 375366ab5..745a46164 100644 --- a/Source/Engine/Core/Math/Double3.cs +++ b/Source/Engine/Core/Math/Double3.cs @@ -1880,7 +1880,7 @@ namespace FlaxEngine [MethodImpl(MethodImplOptions.AggressiveInlining)] public bool Equals(in Double3 other) { - return X == other.X && Y == other.Y && Z == other.Z; + return X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z); } /// diff --git a/Source/Engine/Core/Math/Double4.cs b/Source/Engine/Core/Math/Double4.cs index e376f6c11..8a6907d52 100644 --- a/Source/Engine/Core/Math/Double4.cs +++ b/Source/Engine/Core/Math/Double4.cs @@ -1379,7 +1379,7 @@ namespace FlaxEngine /// true if the specified is equal to this instance; otherwise, false. public bool Equals(in Double4 other) { - return X == other.X && Y == other.Y && Z == other.Z && W == other.W; + return X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z) && W.Equals(other.W); } /// diff --git a/Source/Engine/Core/Math/Float2.cs b/Source/Engine/Core/Math/Float2.cs index efb00b8d7..f76a01cd6 100644 --- a/Source/Engine/Core/Math/Float2.cs +++ b/Source/Engine/Core/Math/Float2.cs @@ -1658,7 +1658,7 @@ namespace FlaxEngine [MethodImpl(MethodImplOptions.AggressiveInlining)] public bool Equals(in Float2 other) { - return X == other.X && Y == other.Y; + return X.Equals(other.X) && Y.Equals(other.Y); } /// diff --git a/Source/Engine/Core/Math/Float3.cs b/Source/Engine/Core/Math/Float3.cs index 470765f8c..332918510 100644 --- a/Source/Engine/Core/Math/Float3.cs +++ b/Source/Engine/Core/Math/Float3.cs @@ -1912,7 +1912,7 @@ namespace FlaxEngine [MethodImpl(MethodImplOptions.AggressiveInlining)] public bool Equals(in Float3 other) { - return X == other.X && Y == other.Y && Z == other.Z; + return X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z); } /// diff --git a/Source/Engine/Core/Math/Float4.cs b/Source/Engine/Core/Math/Float4.cs index e6c22fa5c..9609d5c90 100644 --- a/Source/Engine/Core/Math/Float4.cs +++ b/Source/Engine/Core/Math/Float4.cs @@ -1419,7 +1419,7 @@ namespace FlaxEngine /// true if the specified is equal to this instance; otherwise, false. public bool Equals(in Float4 other) { - return X == other.X && Y == other.Y && Z == other.Z && W == other.W; + return X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z) && W.Equals(other.W); } /// diff --git a/Source/Engine/Core/Math/Mathd.cs b/Source/Engine/Core/Math/Mathd.cs index af7522996..7f81c93dd 100644 --- a/Source/Engine/Core/Math/Mathd.cs +++ b/Source/Engine/Core/Math/Mathd.cs @@ -198,7 +198,7 @@ namespace FlaxEngine /// public static double InverseLerp(double a, double b, double value) { - if (a == b) + if (a.Equals(b)) return 0d; return Saturate((value - a) / (b - a)); } diff --git a/Source/Engine/Core/Math/Mathf.cs b/Source/Engine/Core/Math/Mathf.cs index b2635f2a4..c777e918e 100644 --- a/Source/Engine/Core/Math/Mathf.cs +++ b/Source/Engine/Core/Math/Mathf.cs @@ -228,7 +228,7 @@ namespace FlaxEngine /// public static float InverseLerp(float a, float b, float value) { - if (a == b) + if (a.Equals(b)) return 0f; return Saturate((value - a) / (b - a)); } diff --git a/Source/Engine/Core/Math/Matrix.cs b/Source/Engine/Core/Math/Matrix.cs index e442541c3..ad7265997 100644 --- a/Source/Engine/Core/Math/Matrix.cs +++ b/Source/Engine/Core/Math/Matrix.cs @@ -3236,22 +3236,22 @@ namespace FlaxEngine /// true if the specified is equal to this instance; otherwise, false. public bool Equals(in Matrix other) { - return other.M11 == M11 && - other.M12 == M12 && - other.M13 == M13 && - other.M14 == M14 && - other.M21 == M21 && - other.M22 == M22 && - other.M23 == M23 && - other.M24 == M24 && - other.M31 == M31 && - other.M32 == M32 && - other.M33 == M33 && - other.M34 == M34 && - other.M41 == M41 && - other.M42 == M42 && - other.M43 == M43 && - other.M44 == M44; + return other.M11.Equals(M11) && + other.M12.Equals(M12) && + other.M13.Equals(M13) && + other.M14.Equals(M14) && + other.M21.Equals(M21) && + other.M22.Equals(M22) && + other.M23.Equals(M23) && + other.M24.Equals(M24) && + other.M31.Equals(M31) && + other.M32.Equals(M32) && + other.M33.Equals(M33) && + other.M34.Equals(M34) && + other.M41.Equals(M41) && + other.M42.Equals(M42) && + other.M43.Equals(M43) && + other.M44.Equals(M44); } /// diff --git a/Source/Engine/Core/Math/Matrix2x2.cs b/Source/Engine/Core/Math/Matrix2x2.cs index fd9b3d895..d3698180c 100644 --- a/Source/Engine/Core/Math/Matrix2x2.cs +++ b/Source/Engine/Core/Math/Matrix2x2.cs @@ -483,7 +483,7 @@ namespace FlaxEngine /// true if the specified is equal to this instance; otherwise, false. public bool Equals(in Matrix2x2 other) { - return M11 == other.M11 && M12 == other.M12 && M21 == other.M21 && M22 == other.M22; + return M11.Equals(other.M11) && M12.Equals(other.M12) && M21.Equals(other.M21) && M22.Equals(other.M22); } /// diff --git a/Source/Engine/Core/Math/Matrix3x3.cs b/Source/Engine/Core/Math/Matrix3x3.cs index 6dcb6db5a..d6301a006 100644 --- a/Source/Engine/Core/Math/Matrix3x3.cs +++ b/Source/Engine/Core/Math/Matrix3x3.cs @@ -2125,15 +2125,15 @@ namespace FlaxEngine /// true if the specified is equal to this instance; otherwise, false. public bool Equals(in Matrix3x3 other) { - return M11 == other.M11 && - M12 == other.M12 && - M13 == other.M13 && - M21 == other.M21 && - M22 == other.M22 && - M23 == other.M23 && - M31 == other.M31 && - M32 == other.M32 && - M33 == other.M33; + return M11.Equals(other.M11) && + M12.Equals(other.M12) && + M13.Equals(other.M13) && + M21.Equals(other.M21) && + M22.Equals(other.M22) && + M23.Equals(other.M23) && + M31.Equals(other.M31) && + M32.Equals(other.M32) && + M33.Equals(other.M33); } /// diff --git a/Source/Engine/Core/Math/OrientedBoundingBox.cs b/Source/Engine/Core/Math/OrientedBoundingBox.cs index a29d61cab..03b754238 100644 --- a/Source/Engine/Core/Math/OrientedBoundingBox.cs +++ b/Source/Engine/Core/Math/OrientedBoundingBox.cs @@ -397,7 +397,7 @@ namespace FlaxEngine [MethodImpl(MethodImplOptions.AggressiveInlining)] public bool Equals(in OrientedBoundingBox value) { - return Extents == value.Extents && Transformation == value.Transformation; + return Extents.Equals(value.Extents) && Transformation.Equals(value.Transformation); } /// diff --git a/Source/Engine/Core/Math/Plane.cs b/Source/Engine/Core/Math/Plane.cs index a64492fc2..f3aca7723 100644 --- a/Source/Engine/Core/Math/Plane.cs +++ b/Source/Engine/Core/Math/Plane.cs @@ -587,7 +587,7 @@ namespace FlaxEngine [MethodImpl(MethodImplOptions.AggressiveInlining)] public bool Equals(in Plane other) { - return Normal == other.Normal && D == other.D; + return Normal.Equals(other.Normal) && D.Equals(other.D); } /// diff --git a/Source/Engine/Core/Math/Quaternion.cs b/Source/Engine/Core/Math/Quaternion.cs index 1592f220e..3b040fc17 100644 --- a/Source/Engine/Core/Math/Quaternion.cs +++ b/Source/Engine/Core/Math/Quaternion.cs @@ -1714,7 +1714,7 @@ namespace FlaxEngine [MethodImpl(MethodImplOptions.AggressiveInlining)] public bool Equals(in Quaternion other) { - return X == other.X && Y == other.Y && Z == other.Z && W == other.W; + return X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z) && W.Equals(other.W); } /// diff --git a/Source/Engine/Core/Math/Ray.cs b/Source/Engine/Core/Math/Ray.cs index 7d7bde180..06ca61a00 100644 --- a/Source/Engine/Core/Math/Ray.cs +++ b/Source/Engine/Core/Math/Ray.cs @@ -433,7 +433,7 @@ namespace FlaxEngine [MethodImpl(MethodImplOptions.AggressiveInlining)] public bool Equals(in Ray other) { - return Position == other.Position && Direction == other.Direction; + return Position.Equals(other.Position) && Direction.Equals(other.Direction); } /// diff --git a/Source/Engine/Core/Math/Rectangle.cs b/Source/Engine/Core/Math/Rectangle.cs index 377239c21..5d9bef195 100644 --- a/Source/Engine/Core/Math/Rectangle.cs +++ b/Source/Engine/Core/Math/Rectangle.cs @@ -499,7 +499,7 @@ namespace FlaxEngine [MethodImpl(MethodImplOptions.AggressiveInlining)] public bool Equals(in Rectangle other) { - return Location == other.Location && Size == other.Size; + return Location.Equals(other.Location) && Size.Equals(other.Size); } /// diff --git a/Source/Engine/Core/Math/Transform.cs b/Source/Engine/Core/Math/Transform.cs index c789dae2e..4ce564619 100644 --- a/Source/Engine/Core/Math/Transform.cs +++ b/Source/Engine/Core/Math/Transform.cs @@ -705,7 +705,7 @@ namespace FlaxEngine [MethodImpl(MethodImplOptions.AggressiveInlining)] public bool Equals(in Transform other) { - return Translation == other.Translation && Orientation == other.Orientation && Scale == other.Scale; + return Translation.Equals(other.Translation) && Orientation.Equals(other.Orientation) && Scale.Equals(other.Scale); } /// diff --git a/Source/Engine/Core/Math/Vector2.cs b/Source/Engine/Core/Math/Vector2.cs index 2013e9a05..5353eae95 100644 --- a/Source/Engine/Core/Math/Vector2.cs +++ b/Source/Engine/Core/Math/Vector2.cs @@ -1782,7 +1782,7 @@ namespace FlaxEngine [MethodImpl(MethodImplOptions.AggressiveInlining)] public bool Equals(in Vector2 other) { - return X == other.X && Y == other.Y; + return X.Equals(other.X) && Y.Equals(other.Y); } /// diff --git a/Source/Engine/Core/Math/Vector3.cs b/Source/Engine/Core/Math/Vector3.cs index 38fb2b7b9..b027b7a31 100644 --- a/Source/Engine/Core/Math/Vector3.cs +++ b/Source/Engine/Core/Math/Vector3.cs @@ -2141,7 +2141,7 @@ namespace FlaxEngine [MethodImpl(MethodImplOptions.AggressiveInlining)] public bool Equals(in Vector3 other) { - return X == other.X && Y == other.Y && Z == other.Z; + return X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z); } /// diff --git a/Source/Engine/Core/Math/Vector4.cs b/Source/Engine/Core/Math/Vector4.cs index 5f14539fc..f7ec817d9 100644 --- a/Source/Engine/Core/Math/Vector4.cs +++ b/Source/Engine/Core/Math/Vector4.cs @@ -1493,7 +1493,7 @@ namespace FlaxEngine /// true if the specified is equal to this instance; otherwise, false. public bool Equals(in Vector4 other) { - return X == other.X && Y == other.Y && Z == other.Z && W == other.W; + return X.Equals(other.X) && Y.Equals(other.Y) && Z.Equals(other.Z) && W.Equals(other.W); } ///