Skip to content

Commit a7488b8

Browse files
authored
Update index.html
1 parent 6b84962 commit a7488b8

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

index.html

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -993,20 +993,18 @@ <h4 style="font-size:160%;margin:7px">Trigonometry</h4>
993993
}
994994

995995
function Atan(x) {
996-
if (typeof x !== 'number' || isNaN(x) || x <= 0) return null;
996+
if (typeof x !== 'number' || isNaN(x) || x <= 0) return null;
997997

998-
// Direct match zone
999-
if (x > 1 || x < 0.089) {
1000-
const matchKey = closestValue(x, 'tan')?.key;
1001-
const matchRad = parseFloat(matchKey?.match(/rad\(([\d.]+)\)/)?.[1]);
1002-
return matchRad ?? null;
1003-
}
998+
// Direct match zone
999+
if (x > 1 || x < 0.089) {
1000+
const match = closestValue(x, 'tan');
1001+
return match?.angle ?? null;
1002+
}
10041003

1005-
// Reflective zone
1006-
const reciprocal = 1 / x;
1007-
const matchKey = closestValue(reciprocal, 'tan')?.key;
1008-
const matchRad = parseFloat(matchKey?.match(/rad\(([\d.]+)\)/)?.[1]);
1009-
return matchRad ?? null;
1004+
// Reflective zone (0.089 < x < 1)
1005+
const reciprocal = 1 / x;
1006+
const match = closestValue(reciprocal, 'tan');
1007+
return match?.angle ?? null;
10101008
}
10111009

10121010
</script>

0 commit comments

Comments
 (0)