Skip to content

Commit 5d3cb22

Browse files
authored
Update index.html
1 parent faf4624 commit 5d3cb22

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

index.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,17 +1502,18 @@ <h6 style="font-size:160%;margin:7px">Area of a circle</h6>
15021502
return;
15031503
}
15041504

1505-
if ( ratio > 1) {
1506-
document.getElementById('segment-area').innerText = 'A circle-segment is less than half as high as long.';
1507-
return;
1508-
}
1509-
15101505
if ( ratio === 1) {
15111506
document.getElementById('segment-area').innerText =
15121507
`Area of semi-circle: ${area.toFixed(5)} square units`;
15131508
return;
15141509
}
15151510

1511+
if ( ratio > 1) {
1512+
document.getElementById('segment-area').innerText = 'A circle-segment is less than half as high as long.';
1513+
return;
1514+
}
1515+
1516+
15161517
const angle = parseFloat(2 * Atan(ratio));
15171518
const sine = parseFloat(sin(angle));
15181519
const radius = parseFloat((length / 2 / sine).toFixed(5));

0 commit comments

Comments
 (0)