Add axial to cube conversion

Which uncovered a bug in the distance function, so that's added and test
cases updated
Implement line function
Add rotation