diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/modules/mkiv/s-evohome.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/modules/mkiv/s-evohome.mkiv | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/context/modules/mkiv/s-evohome.mkiv b/Master/texmf-dist/tex/context/modules/mkiv/s-evohome.mkiv index 1577517e513..06fd6fb76cb 100644 --- a/Master/texmf-dist/tex/context/modules/mkiv/s-evohome.mkiv +++ b/Master/texmf-dist/tex/context/modules/mkiv/s-evohome.mkiv @@ -198,13 +198,19 @@ function moduledata.evohome.history(specification) local m = 0 for minute, d in next, hour do local v = d[where] - a = a + v - n = n + 1 - if v > m then - m = v + if v then + a = a + v + n = n + 1 + if v > m then + m = v + end end end - a = a / n + if n > 0 then + a = a / n + else + a = 0 + end local dx = xoffset + h local dy = a/scale local dm = m/scale |