-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8586f84
commit 2c989e6
Showing
2 changed files
with
24 additions
and
23 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
LayoutFunctions/WallsLOD200/dependencies/LineEqualityComparer.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using Elements.Geometry; | ||
|
||
namespace WallsLOD200 | ||
{ | ||
|
||
public class LineEqualityComparer : IEqualityComparer<Line> | ||
{ | ||
public bool Equals(Line? x, Line? y) | ||
{ | ||
if (x != null && y != null) | ||
{ | ||
return (x.Start.IsAlmostEqualTo(y.Start) && x.End.IsAlmostEqualTo(y.End)) || (x.Start.IsAlmostEqualTo(y.End) && x.End.IsAlmostEqualTo(y.Start)); | ||
} | ||
return false; | ||
} | ||
|
||
public int GetHashCode(Line obj) | ||
{ | ||
return obj.GetHashCode(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters