summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/l-math.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/l-math.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/l-math.lua25
1 files changed, 25 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/l-math.lua b/Master/texmf-dist/tex/context/base/l-math.lua
new file mode 100644
index 00000000000..24921cd0c17
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/l-math.lua
@@ -0,0 +1,25 @@
+-- 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