hello

i have the values x and y in two's complement form, each in a word variable (16 bit).
now i would like to calculate the angel a. with the 0 or 1 in bit x.15 as well y.15 i can determine in which of the four quadrants my angel is.
for calculating is necessary to do the atan operation. can anyone tell me how i can do that...? probaply with word variables for a higher resolution.

i've tested to break down the values in bytes, calculating the hypotenuse and then make a sin operation. doesn't run. first i should have a asin operation instead sin and the value from sin is between 0 and 1 but pbp only handles integers..or?

thanks for any reply, probaply the math library in my mind needs an update also ;-)