From 472deb6c04e7eeb2741cc2c38f7695ca73c9e714 Mon Sep 17 00:00:00 2001 From: HybridDog Date: Wed, 25 Jan 2017 09:43:00 +0100 Subject: [PATCH] rename the sort function, fixes #2 M init.lua --- init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 01f1368..1914173 100644 --- a/init.lua +++ b/init.lua @@ -235,7 +235,7 @@ function funcs.threeline(x, y, z) return line end -function funcs.sort(ps, preferred_coords) +function funcs.sort_positions(ps, preferred_coords) preferred_coords = preferred_coords or {"z", "y", "x"} local a,b,c = unpack(preferred_coords) local function ps_sorting(p1, p2) @@ -270,7 +270,7 @@ end --local areas = {} function funcs.plane(ps) -- sort positions and imagine the first one (A) as vector.zero - ps = vector.sort(ps) + ps = vector.sort_positions(ps) local pos = ps[1] local B = vector.subtract(ps[2], pos) local C = vector.subtract(ps[3], pos)