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

Function circle

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

Source from the content-addressed store, hash-verified

3013 d3.geo.circle = function() {
3014 var origin = [ 0, 0 ], angle, precision = 6, interpolate;
3015 function circle() {
3016 var center = typeof origin === "function" ? origin.apply(this, arguments) : origin, rotate = d3_geo_rotation(-center[0] * d3_radians, -center[1] * d3_radians, 0).invert, ring = [];
3017 interpolate(null, null, 1, {
3018 point: function(x, y) {
3019 ring.push(x = rotate(x, y));
3020 x[0] *= d3_degrees, x[1] *= d3_degrees;
3021 }
3022 });
3023 return {
3024 type: "Polygon",
3025 coordinates: [ ring ]
3026 };
3027 }
3028 circle.origin = function(x) {
3029 if (!arguments.length) return origin;
3030 origin = x;

Callers

nothing calls this directly

Calls 2

d3_geo_rotationFunction · 0.85
interpolateFunction · 0.85

Tested by

no test coverage detected