Skip to content

Commit 3b8d980

Browse files
authored
Update index.html
1 parent ded03e8 commit 3b8d980

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

index.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2283,13 +2283,14 @@ <h6 style="font-size:160%;margin:7px">Area of a circle</h6>
22832283
const ratio = 3.2 / number;
22842284
const tangent = parseFloat(tan(ratio));
22852285
const area = parseFloat(number / 4 * length ** 2 / tangent);
2286-
2286+
const volume = pyramidVolume(area, height);
2287+
22872288
document.getElementById('pyramid-volume').innerText =
2288-
`Volume: ${pyramidVolume(area, height).toFixed(5)} cubic units`;
2289+
`Volume: ${volume(area, height).toFixed(5)} cubic units`;
22892290
}
22902291

2291-
document.getElementById('pyramid-side-number').addEventListener('input', updatePyramidVolume);
2292-
document.getElementById('pyramid-side-length').addEventListener('input', updatePyramidVolume);
2292+
document.getElementById('pyramid-side-number').addEventListener('input', updatePyramidVolume);
2293+
document.getElementById('pyramid-side-length').addEventListener('input', updatePyramidVolume);
22932294
document.getElementById('pyramid-height').addEventListener('input', updatePyramidVolume);
22942295
</script>
22952296
<p style="margin:12px;" id="pyramid-volume"></p>

0 commit comments

Comments
 (0)