(x)
| 54 | |
| 55 | it("arc().centroid(…) computes the midpoint of the center line of the arc", () => { |
| 56 | const a = arc(), round = function(x) { return Math.round(x * 1e6) / 1e6; }; |
| 57 | assert.deepStrictEqual(a.centroid({innerRadius: 0, outerRadius: 100, startAngle: 0, endAngle: Math.PI}).map(round), [50, 0]); |
| 58 | assert.deepStrictEqual(a.centroid({innerRadius: 0, outerRadius: 100, startAngle: 0, endAngle: Math.PI / 2}).map(round), [35.355339, -35.355339]); |
| 59 | assert.deepStrictEqual(a.centroid({innerRadius: 50, outerRadius: 100, startAngle: 0, endAngle: -Math.PI}).map(round), [-75, -0]); |
nothing calls this directly
no outgoing calls
no test coverage detected