Skip to content

Commit 3af4187

Browse files
authored
Update index.html
Segment area calculator
1 parent a8c351d commit 3af4187

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3067,8 +3067,8 @@ <h3 itemprop="eduQuestionType" style="margin:7px">Area of a Circle Segment</h3>
30673067

30683068
const ratio = (radius - height) / radius;
30693069
const angle = Acos(ratio);
3070-
const chordLength = 2 * Math.sqrt(radius ** 2 - (radius - height) ** 2);
3071-
const area = segmentArea(chordLength, height, angle, radius);
3070+
const length = 2 * Math.sqrt(radius ** 2 - (radius - height) ** 2);
3071+
const area = segmentArea(length, height, angle, radius);
30723072

30733073
document.getElementById('segment-area').innerText =
30743074
`Area: ${area.toFixed(5)} square units`;

0 commit comments

Comments
 (0)