Skip to content

Commit 6ef2e84

Browse files
authored
Update index.html
1 parent 498118c commit 6ef2e84

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

index.html

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3086,11 +3086,18 @@ <h3 itemprop="eduQuestionType" style="margin:7px">Area of a Circle Segment</h3>
30863086
}
30873087

30883088
// Validity checks
3089-
if (h > r || l < 2 * h || r < h) {
3090-
document.getElementById('segment-area').innerText =
3091-
'Invalid input: must satisfy h ≤ r, l ≥ 2h, r ≥ h.';
3092-
return;
3093-
}
3089+
if (h > r || l < 2 * h || r < h) {
3090+
document.getElementById('segment-area').innerText =
3091+
'The height of the segment must be shorter than the radius and half the length.';
3092+
3093+
// Clear everything so it doesn't get stuck
3094+
document.getElementById('segment-height').value = "";
3095+
document.getElementById('parent-radius').value = "";
3096+
document.getElementById('chord-length').value = "";
3097+
3098+
calculated = false; // reset flag
3099+
return;
3100+
}
30943101

30953102
// Compute angle and area
30963103
let angle = Acos((r - h) / r);

0 commit comments

Comments
 (0)