I wrote a quick function to determine the angle of a touch gesture on a given view. Check it out! https://gist.github.com/joshpuckett/9216195
I'm curious why you're using a constant switch statement instead of if...else's?
Rasmus: I initially had another variable that returned direction (up, down, left, right), and began with using switch to evaluate for that, but when simplifying for this Gist dropped the direction variable but kept the switch. I believe functionally they do basically the same thing, even if a bit nonstandard.
Strong your Trigonometry is! </yoda>