File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -3076,8 +3076,8 @@ <h3 itemprop="eduQuestionType" style="margin:7px">Area of a Circle Segment</h3>
30763076
30773077 // Derive missing field
30783078 if ( ! isNaN ( h ) && ! isNaN ( r ) && isNaN ( l ) ) {
3079- let angle = Math . acos ( ( r - h ) / r ) ;
3080- l = 2 * r * Math . sin ( angle ) ;
3079+ let angle = Acos ( ( r - h ) / r ) ;
3080+ l = 2 * r * sin ( angle ) ;
30813081 lInput . value = l . toFixed ( 5 ) ;
30823082 autoFilledField = "chord-length" ;
30833083 }
@@ -3095,16 +3095,17 @@ <h3 itemprop="eduQuestionType" style="margin:7px">Area of a Circle Segment</h3>
30953095 // Validity check
30963096 if ( h > r || l < 2 * h || r < h ) {
30973097 output . innerText = "Invalid: must satisfy h ≤ r, l ≥ 2h, r ≥ h." ;
3098- return ; // keep listening, no lock
3098+ return ;
30993099 }
31003100
31013101 // Compute area
3102- let angle = Math . acos ( ( r - h ) / r ) ;
3102+ let angle = Acos ( ( r - h ) / r ) ;
31033103 let area = angle * r ** 2 - ( r - h ) * ( l / 2 ) ;
31043104
31053105 // Output
31063106 if ( h === r || h === l / 2 || l === 2 * r ) {
31073107 output . innerText = `Semicircle area: ${ area . toFixed ( 5 ) } square units` ;
3108+ return ;
31083109 } else {
31093110 output . innerText = `Area: ${ area . toFixed ( 5 ) } square units` ;
31103111 }
You can’t perform that action at this time.
0 commit comments