I'm almost certain it depends on the sin, cosine, and tangent of the x and y components of the various angles involved. Of course, I've been wrong before...