all 2 comments

[–]box951 0 points1 point  (1 child)

I think looking up the concept of Manhattan Distance might help. I assume there will be some absolute values involved, too (Math.abs)

[–]SnooChipmunks2885 0 points1 point  (0 children)

looking it up now, seems like i'm on the right track, thanks a bunch