-- filename : l-math.lua -- comment : split off from luat-lib -- author : Hans Hagen, PRAGMA-ADE, Hasselt NL -- copyright: PRAGMA ADE / ConTeXt Development Team -- license : see context related readme files if not versions then versions = { } end versions['l-math'] = 1.001 if not math.round then function math.round(x) return math.floor(x + 0.5) end end if not math.div then function math.div(n,m) return math.floor(n/m) end end if not math.mod then function math.mod(n,m) return n % m end end