Rotation of objects

right now I have a code that rotates an object based on the position of it and the mouse. Thats all great but it sucks for a game, It is way too responsive. What I tried doing is making to rotation var:

rot
rot2

after that I made rot2 the direct rotation between the object and the mouse:

rot2 = Math.atan2(Ydiff, Xdiff) * 180/Math.PI; //(forgive me if this has spelling errors, as I am writing it //by hand right now)

then I make rot effect the object:

object.rotation = rot;

now that the basics are set up I just need to make a code that compares rot2 and rot, if rot is less than rot2 it adds on to rot, if it is greater, then it will subtract. (source at bottom) this all works well until you hit the most annoying part, the one i cant figure out how to fix… basically there is a gap where the numbers go from 180 to -180, so the code flips out, reads this as it is supposed to, but this makes the object rotate a full 360 degrees around instead of just like 2 degrees to bridge the gap. If anyone has insight on this or thinks they might know what to do, please help

rot2 = Math.atan2(Ydiff,Xdiff) * 180 / Math.PI;
if (rot > rot2)
{
rot -= 3;
}
if (rot<rot2)
{
rot+=3;

	}

object.rotation=rot;
thanks,

-Sanford