Ooops, I forgot my tan.
Tan(angle) = Sin(angle) / Cos(angle)
So to solve for B:
(Sin(angle) * A)/Cos(angle) = B
One thing kind of cool about using the PIC18 cordic for this is that is performs sin and cos at the same time, and it just takes about 185 uSecs on the faster chips. So it can do it over 5000 times per second, while giving you a pretty high resolution result (from 0 to 30,000). Then you can use the PIC18 cordic to solve the hypotenuse with the atan2 function. This saves you from having to use PBPL for accurate square root.
Bookmarks