If you don't need too much precision, here a very simple aproximation to atan2 (not valdiated for me) Atan2 Faster Approximation
r = atan2 (y,x) in radians
-------------
a := min (|x|, |y|) / max (|x|, |y|)
s := a * a
r := ((-0.0464964749 * s + 0.15931422) * s - 0.327622764) * s * a + a
if...