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

Function d3_geo_lengthLineStart

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

Source from the content-addressed store, hash-verified

3221 polygonEnd: d3_noop
3222 };
3223 function d3_geo_lengthLineStart() {
3224 var λ0, sinφ0, cosφ0;
3225 d3_geo_length.point = function(λ, φ) {
3226 λ0 = λ * d3_radians, sinφ0 = Math.sin(φ *= d3_radians), cosφ0 = Math.cos(φ);
3227 d3_geo_length.point = nextPoint;
3228 };
3229 d3_geo_length.lineEnd = function() {
3230 d3_geo_length.point = d3_geo_length.lineEnd = d3_noop;
3231 };
3232 function nextPoint(λ, φ) {
3233 var sinφ = Math.sin(φ *= d3_radians), cosφ = Math.cos(φ), t = Math.abs((λ *= d3_radians) - λ0), cosΔλ = Math.cos(t);
3234 d3_geo_lengthSum += Math.atan2(Math.sqrt((t = cosφ * Math.sin(t)) * t + (t = cosφ0 * sinφ - sinφ0 * cosφ * cosΔλ) * t), sinφ0 * sinφ + cosφ0 * cosφ * cosΔλ);
3235 λ0 = λ, sinφ0 = sinφ, cosφ0 = cosφ;
3236 }
3237 }
3238 function d3_geo_conic(projectAt) {
3239 var φ0 = 0, φ1 = π / 3, m = d3_geo_projectionMutator(projectAt), p = m(φ0, φ1);
3240 p.parallels = function(_) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected