I (finally) found a formula which is calculating the direction to x,y-positions without if-blocks! Look inside to see the formula. Ask if you don't understand.