mirror of
https://github.com/1bardesign/batteries.git
synced 2024-11-25 23:24:35 +00:00
[fixed] intersect.line_circle_overlap
bug
This commit is contained in:
parent
6fae516630
commit
2d06ec7b9c
@ -110,7 +110,7 @@ end
|
|||||||
|
|
||||||
--overlap a line segment with a circle
|
--overlap a line segment with a circle
|
||||||
function intersect.line_circle_overlap(a_start, a_end, a_rad, b_pos, b_rad)
|
function intersect.line_circle_overlap(a_start, a_end, a_rad, b_pos, b_rad)
|
||||||
local nearest = intersect._line_to_point(a_start, a_end, b_pos, vec2:pooled())
|
local nearest = intersect.nearest_point_on_line(a_start, a_end, b_pos, vec2:pooled())
|
||||||
local overlapped = intersect.circle_point_overlap(b_pos, a_rad + b_rad, nearest)
|
local overlapped = intersect.circle_point_overlap(b_pos, a_rad + b_rad, nearest)
|
||||||
nearest:release()
|
nearest:release()
|
||||||
return overlapped
|
return overlapped
|
||||||
|
Loading…
Reference in New Issue
Block a user