From: James Procter Date: Thu, 28 Sep 2023 16:59:17 +0000 (+0100) Subject: JAL-3858 don’t divide if we only had one value to count X-Git-Tag: Release_2_11_4_0~158 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=562e94c776a874b2cb8e29e76d24c1478f0a69c8;p=jalview.git JAL-3858 don’t divide if we only had one value to count --- diff --git a/src/jalview/datamodel/ContactListImpl.java b/src/jalview/datamodel/ContactListImpl.java index bb31c5d..7058ac7 100644 --- a/src/jalview/datamodel/ContactListImpl.java +++ b/src/jalview/datamodel/ContactListImpl.java @@ -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)); }