im trying to see if this
Math.sqrt(
Math.pow((position.coords.latitude -45),2) +
Math.pow((position.coords.longitude-75),2)
)*79;
Matches this:
Distance to store (km) = Square Root (
(Current Latitude – 45)^2 +
(Current Longitude ‐75)^2
) *79
Right now im getting 11,XXX KM which is way to much, but I don't see any mistakes.
I also tried doing it like this:
var x = Math.pow((position.coords.latitude-45),2);
var y = Math.pow((position.coords.longitude-75),2);
var z = Math.sqrt(x+y);
var zz = z*79;
but it gave me the same answer.