Create quick_distance.lua

initial version
This commit is contained in:
taxicomics 2024-05-27 15:40:26 +02:00 committed by GitHub
parent ea53c6d677
commit f42bd21939
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

5
quick_distance.lua Normal file
View File

@ -0,0 +1,5 @@
function quick_distance(x1,y1,x2,y2)
return abs(x1-x2)+abs(y1-y2)
end
--a very basic manhatten distance function that works fast enough to be used a lot.