From 43211fc31ba2d6e085101d637e44d9301600473b Mon Sep 17 00:00:00 2001 From: Gael-de-Sailly Date: Tue, 14 Apr 2020 20:22:13 +0200 Subject: [PATCH] Removed useless functions get_point_location and geometry.area --- geometry.lua | 11 ----------- init.lua | 5 ----- 2 files changed, 16 deletions(-) diff --git a/geometry.lua b/geometry.lua index 060f3ee..7a35b0a 100644 --- a/geometry.lua +++ b/geometry.lua @@ -28,18 +28,7 @@ local function transform_quadri(X, Y, x, y) return xc, yc end -local function area(X, Y) -- Signed area of polygon, in function of direction of rotation. Clockwise = positive. - local n = #X - local sum = X[1]*Y[n] - X[n]*Y[1] - for i=2, n do - sum = sum + X[i]*Y[i-1] - X[i-1]*Y[i] - end - - return sum/2 -end - return { distance_to_segment = distance_to_segment, transform_quadri = transform_quadri, - area = area, } diff --git a/init.lua b/init.lua index 2c03e8b..5ae0e98 100644 --- a/init.lua +++ b/init.lua @@ -49,11 +49,6 @@ local function index(x, z) return z*X+x+1 end -local function get_point_location(x, z) - local i = index(x, z) - return x+offset_x[i], z+offset_z[i] -end - local function interp(v00, v01, v11, v10, xf, zf) local v0 = v01*xf + v00*(1-xf) local v1 = v11*xf + v10*(1-xf)