summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luaotfload/fontloader-l-math.lua
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-10-04 19:56:18 +0000
committerKarl Berry <karl@freefriends.org>2022-10-04 19:56:18 +0000
commit1b69cf0b1fa77d1616f07939f151a8ef7c349ebe (patch)
tree896b5dc44969eec8553fd77cda6c326330b5f82a /Master/texmf-dist/tex/luatex/luaotfload/fontloader-l-math.lua
parent22f545f91fe1898ef42890c165100b08a1b15d61 (diff)
luaotfload (4oct22)
git-svn-id: svn://tug.org/texlive/trunk@64616 c570f23f-e606-0410-a88d-b1316a301751
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.lua14
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