Create quick_distance.lua

2nd upload in the right folder
This commit is contained in:
taxicomics 2024-05-27 15:48:58 +02:00 committed by GitHub
parent 9ab133b88d
commit de99c73ece
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

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.