()
| 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; |
no test coverage detected