Check out example codes for "unity point between two positions". It will help you in understanding the concepts better.

Code Example 1

Vector3 medianPoint = (position1 + position2) / 2f;

Learn ReactJs, React Native from akashmittal.com