Skip to content

Commit

Permalink
Fixed critical error where comparing Boundaries for non-equality fail…
Browse files Browse the repository at this point in the history
…s to check the proper fields against each other.
  • Loading branch information
DJGosnell committed Nov 15, 2022
1 parent d1362a8 commit af2fa4f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions src/DtronixCommon/Boundary.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Runtime.CompilerServices;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;

namespace DtronixCommon;

Expand Down Expand Up @@ -304,17 +305,18 @@ public override string ToString()
}

/// <summary>
/// Checks to see if the the two boundaries are equal.
/// Checks to see if the the two boundaries are not equal.
/// </summary>
/// <param name="boundary1">First boundary.</param>
/// <param name="boundary2">Second boundary.</param>
/// <returns>True if the two boundaries are not equal.</returns>
[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;
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/DtronixCommon/DtronixCommon.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFrameworks>net5.0;net6.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Version>0.6.7.0</Version>
<Version>0.6.8.0</Version>
<Nullable>enable</Nullable>
<LangVersion>10</LangVersion>
<Company>Dtronix</Company>
Expand Down

0 comments on commit af2fa4f

Please sign in to comment.