(cr, point)
| 3060 | }; |
| 3061 | } |
| 3062 | function d3_geo_circleAngle(cr, point) { |
| 3063 | var a = d3_geo_cartesian(point); |
| 3064 | a[0] -= cr; |
| 3065 | d3_geo_cartesianNormalize(a); |
| 3066 | var angle = d3_acos(-a[1]); |
| 3067 | return ((-a[2] < 0 ? -angle : angle) + 2 * Math.PI - ε) % (2 * Math.PI); |
| 3068 | } |
| 3069 | d3.geo.distance = function(a, b) { |
| 3070 | var Δλ = (b[0] - a[0]) * d3_radians, φ0 = a[1] * d3_radians, φ1 = b[1] * d3_radians, sinΔλ = Math.sin(Δλ), cosΔλ = Math.cos(Δλ), sinφ0 = Math.sin(φ0), cosφ0 = Math.cos(φ0), sinφ1 = Math.sin(φ1), cosφ1 = Math.cos(φ1), t; |
| 3071 | return Math.atan2(Math.sqrt((t = cosφ1 * sinΔλ) * t + (t = cosφ0 * sinφ1 - sinφ0 * cosφ1 * cosΔλ) * t), sinφ0 * sinφ1 + cosφ0 * cosφ1 * cosΔλ); |
no test coverage detected