this is psuedocode
this is assuming that the pot gives a value from 0-360 (sorry, but I've nvr used a potentiometer befor, so bear with me)
Code:
if(desiredAngle==pot.getAngle)
//stops motor from moving arm if you're at the angle you need to be at
jag.set(0);
else
/*moves jag forward or backward to get you at the desired angle
does it so fast if far away and slow if close
it will ultimately slow to a stop after it start moving*/
jag.set((desiredAngle-180)/360);