Fixed distance function

- get selected axis