File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff 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 ) ;
You can’t perform that action at this time.
0 commit comments