Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getWithinRadius(Grid, Point, Radius)
- local near = {}
- for ID, GridPoint in pairs(Grid) do
- if ((Point - GridPoint).magnitude <= Radius) then
- table.insert(near, GridPoint)
- end
- end
- return near
- end
Advertisement
Add Comment
Please, Sign In to add comment