WebTorrent - BitTorrent over WebRTC
github.com8 pointsby __herson__0 comments
function sumToOne() {
var acum = 0,
count = 0;
do {
count++;
acum += Math.random();
} while (acum <= 1)
return count;
}
var avg = 0,
nTimes = 10000;
for (var x = 0; x < nTimes; x++) {
avg += sumToOne();
}
console.log(avg / nTimes);
> https://github.com/electerious/Lychee/blob/master/docs/md/In.... I don't think this is ok