From af2fa4f179639ea0aba2061a4561cd14e566b800 Mon Sep 17 00:00:00 2001 From: DJGosnell Date: Tue, 15 Nov 2022 18:38:30 -0500 Subject: [PATCH] Fixed critical error where comparing Boundaries for non-equality fails to check the proper fields against each other. --- src/DtronixCommon/Boundary.cs | 14 ++++++++------ src/DtronixCommon/DtronixCommon.csproj | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/DtronixCommon/Boundary.cs b/src/DtronixCommon/Boundary.cs index d7433ba..a2c2401 100644 --- a/src/DtronixCommon/Boundary.cs +++ b/src/DtronixCommon/Boundary.cs @@ -1,4 +1,5 @@ -using System.Runtime.CompilerServices; +using System.Diagnostics.CodeAnalysis; +using System.Runtime.CompilerServices; namespace DtronixCommon; @@ -304,17 +305,18 @@ public override string ToString() } /// - /// Checks to see if the the two boundaries are equal. + /// Checks to see if the the two boundaries are not equal. /// /// First boundary. /// Second boundary. /// True if the two boundaries are not equal. + [SuppressMessage("ReSharper", "CompareOfFloatsByEqualityOperator")] public static bool operator !=(in Boundary boundary1, in Boundary boundary2) { - return boundary1.MinX != boundary2.MaxX || - boundary1.MaxX != boundary2.MinX || - boundary1.MinY != boundary2.MaxY || - boundary1.MaxY != boundary2.MinY; + return boundary1.MaxX != boundary2.MaxX || + boundary1.MinX != boundary2.MinX || + boundary1.MaxY != boundary2.MaxY || + boundary1.MinY != boundary2.MinY; } /// diff --git a/src/DtronixCommon/DtronixCommon.csproj b/src/DtronixCommon/DtronixCommon.csproj index 8363904..890e27d 100644 --- a/src/DtronixCommon/DtronixCommon.csproj +++ b/src/DtronixCommon/DtronixCommon.csproj @@ -2,7 +2,7 @@ net5.0;net6.0 enable - 0.6.7.0 + 0.6.8.0 enable 10 Dtronix