Groups | Search | Server Info | Keyboard shortcuts | Login | Register
Groups > alt.comp.lang.javascript > #30
| Newsgroups | alt.comp.lang.javascript |
|---|---|
| Date | 2021-01-22 06:48 -0800 |
| Message-ID | <bd5cb7c8-e400-42e3-a6d4-1331f4c1f744n@googlegroups.com> (permalink) |
| Subject | Random numbers falling all over the screen with this new and faster method. |
| From | H E <rob99999999999999999@gmail.com> |
<html>
<head>
<style>
body {
height: 96%;
color:white;
background-color: lightblue;
}
#a1 {
width: 100%;
height: 98%;
font-size: 1vw;
font-weight: bold;
overflow-y:hidden;
line-height:1vw;
margin-top:-1%;
}
p {
height: 1px;
}
</style>
</head>
<body>
<div id="a1">
</div>
<script>
var a1=Math.round(Math.random()*101*100000000)/100000000;
var a2=Math.round(Math.random()*101*100000000)/100000000;
var a3=Math.round(Math.random()*101*100000000)/100000000;
var a4=Math.round(Math.random()*101*100000000)/100000000;
var a5=Math.round(Math.random()*101*100000000)/100000000;
var a6=Math.round(Math.random()*101*100000000)/100000000;
var i=0;
function a02() {
setInterval(function(){
if(i>10000) {
i=0;
}
var a0001=-1;
var i000001=i;
document.getElementById("a1").innerHTML=document.getElementById("a1").innerHTML+"</p>";
for(var i1=i; i1<i000001+11; i1++) {
a0001=(-1)*a0001;
var i01=a0001*(-1)*i1*0.0114643966346+a0001*(-1)*i1*0.0260774037134+0.1325346234;
a1=a5*0.0257258682083568604033;
if(a1<0.000001) a1=a1*(-1)*43346.9234896;
if(a1>1000000000) a1=a1*0.000000433469234896;
a2=-1.30461*a1;
a3=0.470347*a2;
a4=-1.306463*a3;
a5=a0001*a4*i01*2.346643634704673;
var j=a1*0.04326974-0.034634769432*a2+0.043986739*a3-442.89679834*a4+486.9374986*a5+a6;
j=Math.round(j*100000000)/100000000;
var i0001=document.getElementById("a1").innerHTML;
document.getElementById("a1").innerHTML=j+i0001;
i=i+1;
}
document.getElementById("a1").innerHTML="<p>"+document.getElementById("a1").innerHTML;
var aa001=document.getElementById("a1").innerHTML;
aa001=aa001.replace(/\./g,'');
aa001=aa001.replace(/\+/g,'');
aa001=aa001.replace(/e/g,'');
aa001=aa001.replace(/\-/g,'');
document.getElementById("a1").innerHTML=aa001;
var a=document.getElementById("a1").innerHTML;
if(a.length>1200) {
document.getElementById("a1").removeChild(document.getElementById("a1").lastChild);
}
}, 20);
}
a02();
</script>
</body>
</html>
There is one problem there too.
Can someone check, why this script slows down at some moment of time ?
And ideally fix it.
Kr.
Phone: 372 6861327
E-mail: ya12983 mail c o m
Back to alt.comp.lang.javascript | Previous | Next | Find similar
Random numbers falling all over the screen with this new and faster method. H E <rob99999999999999999@gmail.com> - 2021-01-22 06:48 -0800
csiph-web