Skip to content
Snippets Groups Projects
Commit e7b35daf authored by Alexander Rose's avatar Alexander Rose
Browse files

improve structure/unit areEqual methods

- always equal when objects are identical
parent 7d109716
No related branches found
No related tags found
No related merge requests found
......@@ -1059,6 +1059,7 @@ namespace Structure {
}
export function areUnitIdsAndIndicesEqual(a: Structure, b: Structure) {
if (a === b) return true;
if (!areUnitIdsEqual(a, b)) return false;
for (let i = 0, il = a.units.length; i < il; i++) {
......
......@@ -490,6 +490,7 @@ namespace Unit {
}
export function areConformationsEqual(a: Unit, b: Unit) {
if (a === b) return true;
if (!SortedArray.areEqual(a.elements, b.elements)) return false;
return isSameConformation(a, b.model);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment