Change this line:
int totalSteps = (angle/360)*400;
to this:
int totalSteps =(int) (((long)angle) * 400 / 360) ;
Change this line:
int totalSteps = (angle/360)*400;
to this:
int totalSteps =(int) (((long)angle) * 400 / 360) ;