Fixed previous angle calculation. created a  double getAngle() method