| 567 | // coordinates. This is like MinDistance() but takes latitude into account. |
| 568 | |
| 569 | real 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 |
no outgoing calls
no test coverage detected