The dot product has two definitions: Algebraically, it is the sum of the products of corresponding elements of two sequences Geometrically, it is the product of the vectors' magnitudes and the cosine ...
Using our geometric definition of the dot product we could write it in code as such. Before we move on, there are a few important things we can take away from this definition. After some simple ...
D=Ra where a is the angle (in radians, or in degrees*(2Pi/360)) between vectors R 1 and R 2 from the center of the earth to the two points. Since the dot product R 1.R 2 =R 2 cosa, we can write D=Rcos ...