diff options
author | mguetlein <martin.guetlein@gmail.com> | 2011-05-26 15:46:15 +0200 |
---|---|---|
committer | mguetlein <martin.guetlein@gmail.com> | 2011-05-26 15:46:15 +0200 |
commit | a1135de5d9911838f4c020d73be9c462cba709d1 (patch) | |
tree | b86ee192314647759995ffb8f2b00c1eb256c2a4 /lib/model.rb | |
parent | f507227fd4efff3c8b32b2a8c8f2860af2546e3b (diff) |
fix blazar nil error
Diffstat (limited to 'lib/model.rb')
-rw-r--r-- | lib/model.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/model.rb b/lib/model.rb index 14471cc..edaa696 100644 --- a/lib/model.rb +++ b/lib/model.rb @@ -207,7 +207,7 @@ module OpenTox # AM: Balanced predictions addon = (modulo[1].to_f/modulo[0]).ceil # what will be added in each round - slack = modulo[1].divmod(addon)[1] # what remains for the last round + slack = (addon!=0 ? modulo[1].divmod(addon)[1] : 0) # what remains for the last round position = 0 predictions = Array.new |