blob: 24921cd0c177e0b9db1244b0e76e38686efb6967 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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
|