public float toYaw(){
  double x=getX();
  double z=getZ();
  double t=Math.atan2(-x,z);
  double _2pi=2 * Math.PI;
  return (float)Math.toDegrees(((t + _2pi) % _2pi));
}

public float toYaw ( ) { double x = getX ( ) ; double z = getZ ( ) ; double t = Math . atan2 ( - x , z ) ; double _2pi = 2 * Math . PI ; return ( float ) Math . toDegrees ( ( ( t + _2pi ) % _2pi ) ) ; }
get this vector ' s yaw as used within the game .
