Browse Source

added StructureElement.Location.areEqual

Alexander Rose 5 years ago
parent
commit
5a98bfd8ef
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/mol-model/structure/structure/element/location.ts

+ 4 - 0
src/mol-model/structure/structure/element/location.ts

@@ -39,6 +39,10 @@ namespace Location {
         return !!x && x.kind === 'element-location';
     }
 
+    export function areEqual(a: Location, b: Location) {
+        return a.unit === b.unit && a.element === b.element
+    }
+
     const pA = Vec3.zero(), pB = Vec3.zero();
     export function distance(a: Location, b: Location) {
         a.unit.conformation.position(a.element, pA);