pitch()/yaw() is not reliable because it changes depending on a user's mouse sensitivity settings
you should use
$mvYaw = value;
$mvPitch = value;
value can be anywhere from -3.141592 to 3.141592 and pi will turn the player 180 degrees as it is a radian measurement
these will always operate correctly regardless of the user's mouse sensitivity settings (although may be effected by lag)