Calling phd maths Gods. Best random formula.


i have app written me. it's multiple choice quiz question comes , there 4 answers. answer seems 80% on same answer ie: button 1 out of four. billiant random function don't think.

would better answer formula use?

 

function randombetween(a:number, b:number):number {
   return (a + math.floor(math.random()*(b-a+1)));
}

var correctaid:uint = math.floor(math.random() * 3);

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

etc...

 

sorry - random function being used - basic right?



More discussions in ActionScript 3


adobe

Comments

Popular posts from this blog

Joomla site hacked, cant see front and - Joomla! Forum - community, help and support

Christian Home School Programs - Joomla! Forum - community, help and support

Trouble with PF_OutFlag_I_USE_AUDIO and PF_CHECKOUT_LAYER_AUDIO