summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_line.lua
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_line.lua')
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_line.lua27
1 files changed, 14 insertions, 13 deletions
diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_line.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_line.lua
index d8c8944835..68a5ad843b 100644
--- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_line.lua
+++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_line.lua
@@ -1,6 +1,6 @@
-- tkz_elements_lines.lua
--- date 2024/02/04
--- version 2.00c
+-- date 2024/03/25
+-- version 2.20c
-- Copyright 2024 Alain Matthes
-- This work may be distributed and/or modified under the
-- conditions of the LaTeX Project Public License, either version 1.3
@@ -152,6 +152,17 @@ function line: _north_pb (d)
local d = d or 1
return d/self.length *( self.north_pb - self.pb ) + self.pb
end
+
+function line : report (d,pt)
+ local t
+ t = d/self.length
+ if pt == nil
+ then
+ return barycenter_({self.pa,1-t},{self.pb,(t)})
+ else
+ return barycenter_({self.pa,1-t},{self.pb,(t)}) +pt-self.pa
+ end
+end
-------------- transformations -------------
function line: translation_pt ( pt )
return translation_ ( self.pb-self.pa,pt )
@@ -465,7 +476,7 @@ line.golden = line.sublime
line.golden_gnomon = line.divine
------------------------------
--- Result -> couple of points
+-- Result -> square
------------------------------
function line: square (swap)
if swap == nil
@@ -476,15 +487,5 @@ function line: square (swap)
end
end
-function line : report (d,pt)
- local t
- t = d/self.length
- if pt == nil
- then
- return barycenter_({self.pa,1-t},{self.pb,(t)})
-else
- return barycenter_({self.pa,1-t},{self.pb,(t)}) +pt-self.pa
-end
-end
return line \ No newline at end of file