diff options
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luaotfload/fontloader-l-math.lua')
-rw-r--r-- | Master/texmf-dist/tex/luatex/luaotfload/fontloader-l-math.lua | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-l-math.lua b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-l-math.lua index 69f0a19e980..6105bc3c2d7 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-l-math.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-l-math.lua @@ -14,9 +14,19 @@ end if not math.round then - local floor = math.floor + if xmath then + + math.round = xmath.round + + else - function math.round(x) return floor(x + 0.5) end + local floor = math.floor + + function math.round(x) + return x < 0 and -floor(-x + 0.5) or floor(x + 0.5) + end + + end end |