Improve direction tests

More exact tests
Floating z if none is given