JAL-3858 don’t divide if we only had one value to count
authorJames Procter <j.procter@dundee.ac.uk>
Thu, 28 Sep 2023 16:59:17 +0000 (17:59 +0100)
committerJames Procter <j.procter@dundee.ac.uk>
Thu, 28 Sep 2023 16:59:17 +0000 (17:59 +0100)
src/jalview/datamodel/ContactListImpl.java

index bb31c5d..7058ac7 100644 (file)
@@ -88,7 +88,7 @@ public class ContactListImpl implements ContactListI
         }
       }
     }
-    if (tot > 0)
+    if (tot > 0 && to_column>from_column)
     {
       cr.setMean(tot / (1 + to_column - from_column));
     }