    

       

   Math         

     

            :=-

       :)

              :-)

    Math         


  PI :=-

  Math.PI     

var pos=new Array();   //array for position data

var xos=30,yos=30;  //xy coordinate offsets

var rad=40;    //radius of circle

function init(){

for(var i=0;i<4;i++){

pos[i]+=Math.PI/45;    //increment degrees

var x=xos+(rad*Math.cos(pos[i]));


var y=yos+(rad*Math.sin(pos[i]));

if(document.layers)document.layers["lyr"+i].moveTo(x,y);

if(document.all)

eval("lyr"+i+".style.top=x;lyr"+i+".style.left=y");

}

setTimeout("spin()",100);

}


 Math.cos  Math.sin      Math



   Math :=-

        ((    :-) ))


  :=-

  Math.round         

           

   


 :=-

var a=7.5;

a=Math.round(a);

a="Rounded positive:"+a+"\n";

var b=-7.5;

b=Math.round(b);

b="Rounded Negative:"+b+"\n"; 

var c=3.764638467915;

c=c*100    //take it up two places

c=Math.round(c);    //do the round

c/=100;    //take it back down 2 places

c="Commuted Long Float:"+c;

alert(a+b+c);


****
 //             

     -7.5   -7 
****


    :=-

 Math.ceil            

 Math.floor            

var a=7.5;

var a1="a1:"+Math.ceil(a);

var a2="a2:"+Math.floor(a);

var b=-7.5;

b=Math.round(b);

var b1="b1:"+Math.ceil(b);

var b2="b2:"+Math.floor(b);

var rup="ROUNDING UP\n"+a1+"\n"+b1+"\n\n";

var rdn="ROUNDING DOWN\n"+a2+"\n"+b2;

alert(rup+rdn);


***
            
***


  :=-

 Math.max           

    

 Math.min       

Math.pow        

var sq=Math.pow(5,2);

var cb=Math.pow(3,3);

var hi="Round up:"+Math.max(sq,cb);

var lo="Round Down:"+Math.min(sq,cb);

var ng="Round Negative Up:"+Math.max(-5,-4.75);

alert("MAXMIN\n\n"+hi+"\n"+lo+"\n"+ng);



     :=-

 Math.random           0.0  0.1

   4 

       0.0  4.0

      Math.ceil

var rand1=Math.random();

var rand2=rand1*10;

var rand3=math.ceil(rand3);

var another=Math.ceil(Math.random()*10);



  :=-

var n=new Array(6);

for(var i=0;i<6;i++){n[i]="";}

while(n[5]==""){

var j=Math.ceil(Math.random()*49);

if(n[0]=="")n[0]=j;

else

if(n[1]==""&&j!=n[0])n[1]=j;

else

if(n[2]==""&&j!=n[0]&&j!=n[1])n[2]=j;

else

if(n[3]==""&&j!=n[0]&&j!=n[1]&&j!=n[2])n[3]=j;

else

if(n[4]==""&&j!=n[0]&&j!=n[1]&&j!=n[2]&&j!=n[3])n[4]=j;

else

if(n[5]==""&&j!=n[0]&&j!=n[1]&&j!=n[2]&&j!=n[3]&&j!=n[4])n[5]=j;

}

var str=""

for(var i=0;i<6;i++){str+=n[i]+"";}

alert("LOCKY NUMBERS\n\n"+str);


***
            
***

  :=-

      img   Html   pic   scr

var pix=new Array("pic0.gif","pic1.gif","pic2.gif","pic3.gif","pic4.gif","pic51.gif","pic6.gif");

var rand=Math.floor(Math.random()*7);

document.images.pic.scr=pix[rand];

document.write(rand+":"+pix[rand]);


***************************************


       

 :=-        JaVa-ScRipT

hma2003h911@yahoo.com