I really have no idea why this solution hasn't already come up, but...
function turnTo(%obj, %targ)
{
%pos = %obj.getPosition();
%diff = vectorSub(%targ.getPosition(), %pos);
%ang = mAtan(getWord(%diff, 0), getWord(%diff, 1));
%obj.setTransform(%pos@" 0 0 1 "@%ang);
}