It's late and I'm tired, so this may prove to be a D'OH kind of a question, but here it is (and yes, it's related to something I started on a couple months back):

If I have an object at the origin with a heading of H, and I have a bearing B and a distance D to a different object N, how do I get the x,y coordinates of that other object. I see a way to do it by figuring out which quadrant N is in, and doing the trig depending on that quadrant. That's really not all that difficult, but I was thinking there might be something slicker than a series of If statements to figure the quadrant, then a bit of trig.