Use more stable form of Haversine formula. (#5935)
Use more stable form of Haversine formula. (#5935)

* Use more stable form of Haversine formula.

The new form does not give a non-zero distance from a point to itself.

* Pre-compute sines which are used twice.

stefanocudini/Leaflet,CapeSepias/Leaflet,msiadak/Leaflet,msiadak/Leaflet,stefanocudini/Leaflet,Leaflet/Leaflet,CapeSepias/Leaflet,msiadak/Leaflet,Leaflet/Leaflet,CapeSepias/Leaflet,stefanocudini/Leaflet,Leaflet/Leaflet