Skip to content

Commit 65c7608

Browse files
authored
Update index.html
1 parent 397b3bd commit 65c7608

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

index.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ <h4 style="font-size:160%;margin:7px">Trigonometry</h4>
965965
if (typeof value !== 'number') continue;
966966

967967
const joker = Math.abs(value - input);
968-
if (joker < minDiff) {
968+
if (difference < minDiff) {
969969
minDiff = difference;
970970
bestMatch = {
971971
angle: key, // We're using this key as the input (the angle) that produced the value
@@ -1476,6 +1476,10 @@ <h6 style="font-size:160%;margin:7px">Area of a circle</h6>
14761476

14771477
// Segment validity check
14781478

1479+
if (ratio < 0.11 || ratio > 1) {
1480+
document.getElementById('segment-area').innerText = 'The ratio is out of range';
1481+
return;
1482+
}
14791483

14801484
const angle = parseFloat(2 * Atan(ratio));
14811485
const sine = parseFloat(sin(angle));

0 commit comments

Comments
 (0)