contents   index   previous   next



Math.random()

syntax:

Math.random()

return:

number - a number which is positive and pseudo-random and which is greater than or equal to 0 but less than 1.

 

description:

Calling this method numerous times will result in an established pattern (the sequence of numbers will be the same each time). This method takes no arguments. Seeding is not yet possible.

 

see:

Clib.rand()

 

example:

//Return a random number:

function compute_rand_numb()

{

   return Math.rand()

}

 


Math.round()