# Problem with getting headRotation of player

Hello everyone, i have a little problem with getting the rotation of head of player.
For my plugin, i need to get the Yaw, to calculate the velocity to add to the player to jump him forward.
The problem ?
It’s when i get the Yaw of me and my friend, for my, when the Yaw is at -1, it remains at -1, but when my friend is at -1, the Yaw become 359.
I don’t understand My code:

Blockquote
private Vector3d getPropulsionVector(Player p){
Vector3d vector3d = new Vector3d(0, 0, 0);
if(yaw >= 0 && yaw <= 90){
//SOUTH-WEST
//x-
//z+
double per = (100yaw)/90;
double x = 0.1
per;
double z = 10-x;
vector3d = new Vector3d(-x, 4, z);
}else if(yaw >= 90 && yaw <= 180){
//WEST-NORTH
//x-
//z-
yaw -= 90;
double per = (100yaw)/90;
double x = 0.1
per;
double z = 10-x;
vector3d = new Vector3d(-x, 4, -z);
}else if(yaw <= -90){
//NORTH-EAST
//x+
//z-
yaw = -yaw;
yaw -= 90;
double per = (100yaw)/90;
double x = 0.1
per;
double z = 10-x;
vector3d = new Vector3d(x, 4, -z);
}else if(yaw >= -90 && yaw <= 0){
//SUD-EST
//x+
//z+
yaw = -yaw;
double per = (100yaw)/90;
double x = 0.1
per;
double z = 10-x;
vector3d = new Vector3d(x, 4, z);
}
Thanks for answers ! 