hi. i have this:

f(sign(joy_force.y) == 1)
my.pan = 0;

if(sign(joy_force.y) == -1)
my.pan = 180;


if(sign(joy_force.x) == 1)
my.pan = -90;

if(sign(joy_force.x) == -1)
my.pan = 90;

its change the pan position of and entity with the joystick. forward, left and right.. oº, 180º, 90º, and -90º.
but how can i get my entity to change 8 positions instead of 4? for insteance, to change its position to 45º ?