MCPcopy Create free account
hub / github.com/idank/explainshell / d3_geo_areaRingStart

Function d3_geo_areaRingStart

explainshell/web/static/js/d3.v3.js:2091–2109  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2089 }
2090 };
2091 function d3_geo_areaRingStart() {
2092 var λ00, φ00, λ0, cosφ0, sinφ0;
2093 d3_geo_area.point = function(λ, φ) {
2094 d3_geo_area.point = nextPoint;
2095 λ0 = (λ00 = λ) * d3_radians, cosφ0 = Math.cos(φ = (φ00 = φ) * d3_radians / 2 + π / 4),
2096 sinφ0 = Math.sin(φ);
2097 };
2098 function nextPoint(λ, φ) {
2099 λ *= d3_radians;
2100 φ = φ * d3_radians / 2 + π / 4;
2101 var dλ = λ - λ0, cosφ = Math.cos(φ), sinφ = Math.sin(φ), k = sinφ0 * sinφ, u0 = d3_geo_areaRingU, v0 = d3_geo_areaRingV, u = cosφ0 * cosφ + k * Math.cos(dλ), v = k * Math.sin(dλ);
2102 d3_geo_areaRingU = u0 * u - v0 * v;
2103 d3_geo_areaRingV = v0 * u + u0 * v;
2104 λ0 = λ, cosφ0 = cosφ, sinφ0 = sinφ;
2105 }
2106 d3_geo_area.lineEnd = function() {
2107 nextPoint(λ00, φ00);
2108 };
2109 }
2110 d3.geo.bounds = d3_geo_bounds(d3_identity);
2111 function d3_geo_bounds(projectStream) {
2112 var x0, y0, x1, y1;

Callers

nothing calls this directly

Calls 1

nextPointFunction · 0.85

Tested by

no test coverage detected