Explorar o código

added StructureElement.Location.areEqual

Alexander Rose %!s(int64=5) %!d(string=hai) anos
pai
achega
5a98bfd8ef
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  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);