mirror of
https://github.com/1bardesign/batteries.git
synced 2024-11-10 02:31:48 +00:00
Fixed intersect.lua line functions not all working properly with un-exported batteries
This commit is contained in:
parent
9b95643e6e
commit
af919da379
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
local path = (...):gsub("intersect", "")
|
local path = (...):gsub("intersect", "")
|
||||||
local vec2 = require(path .. "vec2")
|
local vec2 = require(path .. "vec2")
|
||||||
|
local functional = require(path .. "functional")
|
||||||
|
|
||||||
--module storage
|
--module storage
|
||||||
local intersect = {}
|
local intersect = {}
|
||||||
@ -219,7 +220,7 @@ function intersect.line_line_collide(a_start, a_end, a_rad, b_start, b_end, b_ra
|
|||||||
table.insert(search_tab, {intersect._line_to_point(a_start, a_end, b_end), -1})
|
table.insert(search_tab, {intersect._line_to_point(a_start, a_end, b_end), -1})
|
||||||
end
|
end
|
||||||
|
|
||||||
local best = table.find_best(search_tab, function(v)
|
local best = functional.find_best(search_tab, function(v)
|
||||||
return -(v[1]:length_squared())
|
return -(v[1]:length_squared())
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user