We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e1511ef commit 7edd1a1Copy full SHA for 7edd1a1
1 file changed
index.html
@@ -1424,8 +1424,9 @@ <h6 style="font-size:160%;margin:7px">Area of a circle</h6>
1424
function updateSegmentArea() {
1425
const length = parseFloat(document.getElementById('segment-length').value);
1426
const height = parseFloat(document.getElementById('segment-height').value);
1427
- const angle = parseFloat(atan(2 * height / length).toFixed(5));
1428
- const cosine = parseFloat(cos(angle).toFixed(5));
+ const thing = 2 * height / length;
+ const angle = parseFloat(atan(this.thing).toFixed(5));
1429
+ const cosine = parseFloat(cos(this.angle).toFixed(5));
1430
const radius = length / 2 * cosine
1431
if (isNaN(length) || isNaN(height)) {
1432
document.getElementById('segment-area').innerText = '';
0 commit comments