MCPcopy Create free account
hub / github.com/SuprDewd/CompetitiveProgramming / gc_distance

Function gc_distance

code/geometry/gc_distance.cpp:1–6  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1double gc_distance(double pLat, double pLong,
2 double qLat, double qLong, double r) {
3 pLat *= pi / 180; pLong *= pi / 180;
4 qLat *= pi / 180; qLong *= pi / 180;
5 return r * acos(cos(pLat) * cos(qLat) * cos(pLong - qLong) +
6 sin(pLat) * sin(qLat)); }
7// vim: cc=60 ts=2 sts=2 sw=2:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected