I am using Mathf.Atan2 to find angle in 2d and do not know how to apply relative rotation i want to achieve smooth rotation

Vector2 difference = anchorRotation- anchorRotationLastFrame;
float angle = Mathf.Atan2(difference.y, difference .x);
float angleInDegrees = angle * Mathf.Rad2Deg;

    Vector3 rotate = new Vector3(turn, 0, angleInDegrees);
    transform.localEulerAngles = rotate;//applying rotation

how to change this absolute rotations to relative ones?
Like transform.Rotate

my object is in another rotating object
and I am rotating it based on rotation of parent object

I want to achieve smooth rotation

Whale GIF | Gfycat - video

If you want to get rotations without jumps from one angle to another, don’t directly set euler angles, but use quaternions. See Transform.rotation property and Quaternion.euler method.

In addition, in order to get smooth transition from a rotation to another, you’ll have to lerp it over time. You could use a tweening library ( HotTween, GoTween, etc. ). Or do it yourself using Mathf.Lerp or in your case Quaternion.Lerp, with a timer you increment by Time.deltaTime in the Update method.