I have this (Mongoose?) Traveller Subsector Mapper. I started thinking that maybe I should start looking at automatically drawing communications and trade routes. I started writing some code that calculates the distance between two hexes. And I started wasting hours. Whoa, big time code failure on my part!

There was something about |Δx| div 2 + |Δy| and all that stuff, but there was always some case in which it wouldn’t work. I googled many times, but finally I found what I needed to know in a rec.games.design archive.

transform the stupid Traveller coordinate system into a decent system with one axis tilted by 60°

only consider moves from left to right and transpose start and end point to make it so