summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_point.lua
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_point.lua')
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_point.lua18
1 files changed, 16 insertions, 2 deletions
diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_point.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_point.lua
index 7530dfc96a..8837299966 100644
--- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_point.lua
+++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_point.lua
@@ -1,6 +1,6 @@
-- tkz_elements_point.lua
--- date 2024/01/16
--- version 1.82c
+-- date 2024/02/04
+-- version 2.00c
-- 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
@@ -311,4 +311,18 @@ end
function point: normalize()
local d = point.abs(self)
return point(self.re/d,self.im/d)
+end
+
+function point: orthogonal(d)
+ local m
+ if d==nil then
+ return point(-self.im,self.re)
+else
+ m = point.mod(self)
+ return point(-self.im*d/m,self.re*d/m)
+end
+end
+
+function point : at (z)
+ return point(self.re+z.re,self.im+z.im)
end \ No newline at end of file