Smooth Look at 2D

Hi All, I have this wonderful script I found here on the ask and I was wondering if there was a way to make the rotation smooth when following the mouse?

         Vector3 diff = Camera.main.ScreenToWorldPoint(Input.mousePosition) - transform.position;
         diff.Normalize();
 
         float rot_z = Mathf.Atan2(diff.y, diff.x) * Mathf.Rad2Deg;
         transform.rotation = Quaternion.Euler(0f, 0f, rot_z - 90);

Thanks for any help!

Instead of assigning the final value to the rotation as it is, you could insert a Mathf.SmoothDamp to smooth the value out the final rotation will have.