public static Vector2D calculateFromPolar(double length,double heading){
  final double x=length * Math.cos(heading);
  final double y=length * Math.sin(heading);
  return new Vector2D(x,y);
}

public static Vector2D calculateFromPolar ( double length , double heading ) { final double x = length * Math . cos ( heading ) ; final double y = length * Math . sin ( heading ) ; return new Vector2D ( x , y ) ; }
calculates a vector based on the length and the heading of the vector .
