I have a hexagon grid:

![hexagon grid](https://i.stack.imgur.com/YFprk.png)

with template type coordinates T. How I can calculate distance between two hexagons?

For example:

dist((3,3), (5,5)) = 3

dist((1,2), (1,4)) = 2