MCPcopy Create free account
hub / github.com/CruiserOne/Astrolog / SphDistance

Function SphDistance

general.cpp:569–576  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

567// coordinates. This is like MinDistance() but takes latitude into account.
568
569real SphDistance(real lon1, real lat1, real lon2, real lat2)
570{
571 real dLon, r;
572
573 dLon = RAbs(lon1 - lon2);
574 r = RAcosD(RSinD(lat1)*RSinD(lat2) + RCosD(lat1)*RCosD(lat2)*RCosD(dLon));
575 return r;
576}
577
578
579// Given two pairs of coordinates on a sphere, return coordinates at some

Callers 15

FEvalFunctionFunction · 0.85
ChartListingRelationFunction · 0.85
ChartMidpointRelationFunction · 0.85
DisplayRelationFunction · 0.85
DrawMapLineFunction · 0.85
XChartLocalFunction · 0.85
XChartMidpointFunction · 0.85
XChartMoonsFunction · 0.85
GetAspectFunction · 0.85
NCheckEclipseFunction · 0.85
NCheckEclipseLunarFunction · 0.85
DisplayAtlasNearbyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected