File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2249,7 +2249,8 @@ <h6 style="font-size:160%;margin:7px">Area of a circle</h6>
22492249 function testQueryAtan ( ) {
22502250 const input = parseFloat ( document . getElementById ( 'atan-input' ) . value ) ;
22512251 const output = document . getElementById ( 'atan-output' ) ;
2252- output . innerText = '' ;
2252+ const value = trig [ key ] [ funcType ] ; // ✅ direct access: trig["rad(1.467)"].tan
2253+ output . innerText = '' ;
22532254
22542255 if ( isNaN ( input ) ) {
22552256 output . innerText = 'Invalid input.' ;
@@ -2260,7 +2261,7 @@ <h6 style="font-size:160%;margin:7px">Area of a circle</h6>
22602261 const match = findClosestValueMatch ( input , 'tan' ) ; // your engine function
22612262 output . innerText += `🔍 Looking for tan ≈ ${ input } \n\n` ;
22622263 output . innerText += `🗝️ Best match key: ${ match . angle } \n` ;
2263- output . innerText += `📐 Approximated tan: ${ match . approx } \n` ;
2264+ output . innerText += `📐 Approximated tan: ${ value ?? '⛔ not found' } \n` ;
22642265 } catch ( err ) {
22652266 output . innerText = '⚠️ Error during query:\n' + err . message ;
22662267 }
You can’t perform that action at this time.
0 commit comments