summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_lines.lua
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_lines.lua')
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_lines.lua16
1 files changed, 14 insertions, 2 deletions
diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_lines.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_lines.lua
index c9d840d89c..2dd8d6467a 100644
--- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_lines.lua
+++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_functions_lines.lua
@@ -1,6 +1,6 @@
-- tkz_elements_functions_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
@@ -138,4 +138,16 @@ function in_segment_ (a,b,pt)
else
return false
end
+end
+
+function report_ (za,zb,d,pt)
+ local t,len
+ len = point.mod(zb-za)
+ t = d/len
+ if pt == nil
+ then
+ return barycenter_({za,1-t},{zb,(t)})
+else
+ return barycenter_({za,1-t},{zb,(t)}) +pt-za
+end
end \ No newline at end of file