Total circles area: Difference between revisions
Content added Content deleted
(+ D entry) |
m (Renamed one tuple in D entry) |
||
Line 212: | Line 212: | ||
(cast(Fp)0, circles[]); |
(cast(Fp)0, circles[]); |
||
alias Tuple!(Fp,"y0", Fp,"y1") |
alias Tuple!(Fp,"y0", Fp,"y1") YRange; |
||
auto yRanges = new |
auto yRanges = new YRange[circles.length]; |
||
Fp computeTotalArea(in Fp nSlicesX) { |
Fp computeTotalArea(in Fp nSlicesX) { |
||
Line 231: | Line 231: | ||
if (d > 0) |
if (d > 0) |
||
// And keep only the intersection chords. |
// And keep only the intersection chords. |
||
yRanges[nPairs++] = |
yRanges[nPairs++] = YRange(c.y - sd, c.y + sd); |
||
} |
} |
||