File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3098,9 +3098,9 @@ <h3 itemprop="eduQuestionType" style="margin:7px">Area of a Circle Segment</h3>
30983098// Validity checks
30993099if ( 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
31193120document . getElementById ( 'segment-height' ) . addEventListener ( 'input' , segmentArea ) ;
You can’t perform that action at this time.
0 commit comments