Posting the source code for LookRotation for those who need it .

LookAtRotation and LookRotation are different . You would get more explanation of the difference if you check the unity forums .
https://answers.unity.com/questions/…krotation.html

Basically lookrotation creates a rotation using a forward and upward direction as input alone , while lookat explicitly points towards a target location . LookAtRotation has the problem of “flipping” the rotator when the target pass through the source instead of sticking to a specific direction when needed (a specific problem in my case) . LookRotation will make sure the rotation doesn’t have the flipping problem as stated above .