Please, if you ask a question, be a little bit more explicit than 'unexpected behaviour'. Maybe you're confused in the use of x and y. The command is arctan2( <y>, <x> ), so note to fill in coordinates in the reverse order.
arctan2(2, 1) gives 63.43° witch is the angle between xAxis, origin and (1, 2) and not (2, 1).
If what you mean by unexpected behaviour is something different, please explain
Comments have been locked on this page!