Merge pull request #1912 from MilosKozak/deviationfix

fix adding zero deviations
This commit is contained in:
Milos Kozak 2019-07-29 22:13:49 +02:00 committed by GitHub
commit afe29a1e67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -134,7 +134,7 @@ public class SensitivityOref1Plugin extends AbstractSensitivityPlugin {
if (L.isEnabled(L.AUTOSENS)) if (L.isEnabled(L.AUTOSENS))
log.debug("Using most recent " + deviationsArray.size() + " deviations"); log.debug("Using most recent " + deviationsArray.size() + " deviations");
if (deviationsArray.size() < 96) { if (deviationsArray.size() < 96) {
int pad = Math.round((1 - deviationsArray.size() / 96) * 18); int pad = (int) Math.round((1 - (double) deviationsArray.size() / 96) * 18);
if (L.isEnabled(L.AUTOSENS)) if (L.isEnabled(L.AUTOSENS))
log.debug("Adding " + pad + " more zero deviations"); log.debug("Adding " + pad + " more zero deviations");
for (int d = 0; d < pad; d++) { for (int d = 0; d < pad; d++) {