Skip to content

Commit 3546916

Browse files
authored
Update index.html
1 parent 4d32057 commit 3546916

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

index.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3098,9 +3098,9 @@ <h3 itemprop="eduQuestionType" style="margin:7px">Area of a Circle Segment</h3>
30983098
// Validity checks
30993099
if (h > r || l < 2 * h || r < h) {
31003100
document.getElementById('segment-area').innerText =
3101-
'Invalid input: must satisfy h ≤ r, l ≥ 2h, r ≥ h.';
3102-
// no return here — keep listening for further input
3103-
}
3101+
'Invalid: must satisfy h ≤ r, l ≥ 2h, r ≥ h.';
3102+
// no return here — keep listening for further input
3103+
} else {
31043104
// Compute angle and area
31053105
let angle = Acos((r - h) / r);
31063106
let area = angle * r ** 2 - (r - h) * (l / 2);
@@ -3114,6 +3114,7 @@ <h3 itemprop="eduQuestionType" style="margin:7px">Area of a Circle Segment</h3>
31143114
`Area: ${area.toFixed(5)} square units`;
31153115
}
31163116
}
3117+
}
31173118

31183119
// Attach listeners to all inputs
31193120
document.getElementById('segment-height').addEventListener('input', segmentArea);

0 commit comments

Comments
 (0)