fix direction from coordinates

Fixes #6917

Is there a reason against using `return direction(NORTH + offset)` and so on for the other directions?