File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -3100,7 +3100,7 @@ <h3 itemprop="eduQuestionType" style="margin:7px">Area of a Circle Segment</h3>
31003100 document . getElementById ( 'segment-area' ) . innerText =
31013101 'Invalid input: must satisfy h ≤ r, l ≥ 2h, r ≥ h.' ;
31023102 // no return here — keep listening for further input
3103- } else {
3103+ }
31043104 // Compute angle and area
31053105 let angle = Acos ( ( r - h ) / r ) ;
31063106 let area = angle * r ** 2 - ( r - h ) * ( l / 2 ) ;
@@ -3114,7 +3114,7 @@ <h3 itemprop="eduQuestionType" style="margin:7px">Area of a Circle Segment</h3>
31143114 `Area: ${ area . toFixed ( 5 ) } square units` ;
31153115 }
31163116}
3117- }
3117+
31183118// Attach listeners to all inputs
31193119document . getElementById ( 'segment-height' ) . addEventListener ( 'input' , segmentArea ) ;
31203120document . getElementById ( 'parent-radius' ) . addEventListener ( 'input' , segmentArea ) ;
You can’t perform that action at this time.
0 commit comments