Skip to content
Snippets Groups Projects
Commit ee3865dc authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Merge branch 'master' into 'develop'

Bugfix: Sporulation table couldn't handle average temperatures below zero

See merge request VIPS/Model_DOWNCASTMO!1
parents 6354fbfc 62e83d8f
No related branches found
No related tags found
1 merge request!1Bugfix: Sporulation table couldn't handle average temperatures below zero
...@@ -53,7 +53,7 @@ public class SporulationTable { ...@@ -53,7 +53,7 @@ public class SporulationTable {
{ {
try try
{ {
return this.sporulationTable.get(hourOfDay)[new Double(Math.floor(averageTemperature)).intValue()]; return this.sporulationTable.get(hourOfDay)[Math.max(0,Double.valueOf(Math.floor(averageTemperature)).intValue())];
} }
catch(NullPointerException ex) catch(NullPointerException ex)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment