summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_rectangle.lua
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_rectangle.lua')
-rw-r--r--macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_rectangle.lua11
1 files changed, 5 insertions, 6 deletions
diff --git a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_rectangle.lua b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_rectangle.lua
index abb9c2f8e9..7c4f8f75ed 100644
--- a/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_rectangle.lua
+++ b/macros/latex/contrib/tkz/tkz-elements/latex/tkz_elements_rectangle.lua
@@ -1,6 +1,6 @@
-- tkz_elements-rectangle.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
@@ -17,13 +17,12 @@
rectangle = {}
function rectangle: new (za, zb,zc,zd)
- local d,epsilon
- epsilon = 10^(-8)
+ local d
local zi = midpoint_ (za,zc)
local zj = midpoint_ (zb,zd)
- if point.abs (zj-zi) < epsilon then else error ("it's not a rectangle")
+ if point.abs (zj-zi) < tkz_epsilon then else error ("it's not a rectangle")
end
- if math.abs(point.abs (zc-za)-point.abs (zd-zb)) < epsilon then else error ("it's not a rectangle")
+ if math.abs(point.abs (zc-za)-point.abs (zd-zb)) < tkz_epsilon then else error ("it's not a rectangle")
end
local type = 'rectangle'
local center = midpoint_ (za,zc)