Check out example codes for "check the angle between two game objects unity". It will help you in understanding the concepts better.

Code Example 1

Vector3 dir = GameObject1.position - GameObject2.position;
 float angle = Mathf.Atan2(dir.y, dir.x) * Mathf.Rad2Deg;

Learn ReactJs, React Native from akashmittal.com