If I give a velocity of (0, 10, 0) I want to get A and B accordingly.

0, 10, 0 direction is **UP** so the result should be the **upper quarter**.

[attachment=15796:circle.png]

I should change the following line:

float t = GetRandMinMax( -D3DX_PI, D3DX_PI );

To:

float t = GetRandMinMax( A, B );

How do I calculate A and B based on the velocity (direction)?