MCPcopy
hub / github.com/jipegit/OSXAuditor / circle

Function circle

d3-3.2.8/d3.js:3646–3658  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3644 d3.geo.circle = function() {
3645 var origin = [ 0, 0 ], angle, precision = 6, interpolate;
3646 function circle() {
3647 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 = [];
3648 interpolate(null, null, 1, {
3649 point: function(x, y) {
3650 ring.push(x = rotate(x, y));
3651 x[0] *= d3_degrees, x[1] *= d3_degrees;
3652 }
3653 });
3654 return {
3655 type: "Polygon",
3656 coordinates: [ ring ]
3657 };
3658 }
3659 circle.origin = function(x) {
3660 if (!arguments.length) return origin;
3661 origin = x;

Callers 2

benchmark.jsFile · 0.85
circle-test.jsFile · 0.85

Calls 2

d3_geo_rotationFunction · 0.85
interpolateFunction · 0.70

Tested by

no test coverage detected