Removed useless functions get_point_location and geometry.area

This commit is contained in:
Gael-de-Sailly 2020-04-14 20:22:13 +02:00
parent 14163681cc
commit 43211fc31b
2 changed files with 0 additions and 16 deletions

View File

@ -28,18 +28,7 @@ local function transform_quadri(X, Y, x, y)
return xc, yc return xc, yc
end 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 { return {
distance_to_segment = distance_to_segment, distance_to_segment = distance_to_segment,
transform_quadri = transform_quadri, transform_quadri = transform_quadri,
area = area,
} }

View File

@ -49,11 +49,6 @@ local function index(x, z)
return z*X+x+1 return z*X+x+1
end 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 function interp(v00, v01, v11, v10, xf, zf)
local v0 = v01*xf + v00*(1-xf) local v0 = v01*xf + v00*(1-xf)
local v1 = v11*xf + v10*(1-xf) local v1 = v11*xf + v10*(1-xf)