Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ <h2>Introduction</h2>

function piStep() {
var r = 10;
var x = Math.random() `*` r `*` 2 - r;
var y = Math.random() `*` r `*` 2 - r;
var x = Math.random() * r * 2 - r;
var y = Math.random() * r * 2 - r;
return (Math.pow(x, 2) + Math.pow(y, 2) &lt; Math.pow(r, 2))
}
function refinePi(deadline) {
Expand All @@ -116,7 +116,7 @@ <h2>Introduction</h2>
pointsInside++;
pointsTotal++;
}
currentEstimate = (4 `*` pointsInside / pointsTotal);
currentEstimate = (4 * pointsInside / pointsTotal);
textElement = document.getElementById("piEstimate");
textElement.innerHTML="Pi Estimate: " + currentEstimate;
requestId = window.requestIdleCallback(refinePi);
Expand Down Expand Up @@ -540,7 +540,7 @@ <h2>Acknowledgments</h2>
this specification: Sami Kyostila, Alex Clarke, Boris Zbarsky, Marcos
Caceres, Jonas Sicking, Robert O'Callahan, David Baron, Todd Reifsteck,
Tobin Titus, Elliott Sprehn, Tetsuharu OHZEKI, Lon Ingram, Domenic Denicola,
Philippe Le Hegaret and Anne van Kesteren. </p>
Philippe Le Hegaret, Anne van Kesteren and Guilherme Siquinelli. </p>
</section>
</body>
</html>