summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/syst-con.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/syst-con.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/syst-con.lua23
1 files changed, 22 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/context/base/syst-con.lua b/Master/texmf-dist/tex/context/base/syst-con.lua
index 2eaf98fd730..48f02da3a5d 100644
--- a/Master/texmf-dist/tex/context/base/syst-con.lua
+++ b/Master/texmf-dist/tex/context/base/syst-con.lua
@@ -14,7 +14,7 @@ the top of <l n='luatex'/>'s char range but outside the unicode range.</p>
--ldx]]--
local tonumber = tonumber
-local utfchar = unicode.utf8.char
+local utfchar = utf.char
local gsub, format = string.gsub, string.format
function converters.hexstringtonumber(n) tonumber(n,16) end
@@ -39,3 +39,24 @@ function commands.format(fmt,...) -- used ?
fmt = gsub(fmt,"@","%%")
context(fmt,...)
end
+
+local cosd, sind, tand = math.cosd, math.sind, math.tand
+local cos, sin, tan = math.cos, math.sin, math.tan
+
+-- unfortunately %s spits out: 6.1230317691119e-017
+--
+-- function commands.sind(n) context(sind(n)) end
+-- function commands.cosd(n) context(cosd(n)) end
+-- function commands.tand(n) context(tand(n)) end
+--
+-- function commands.sin (n) context(sin (n)) end
+-- function commands.cos (n) context(cos (n)) end
+-- function commands.tan (n) context(tan (n)) end
+
+function commands.sind(n) context("%0.6f",sind(n)) end
+function commands.cosd(n) context("%0.6f",cosd(n)) end
+function commands.tand(n) context("%0.6f",tand(n)) end
+
+function commands.sin (n) context("%0.6f",sin (n)) end
+function commands.cos (n) context("%0.6f",cos (n)) end
+function commands.tan (n) context("%0.6f",tan (n)) end