Random Number Generator

Written by Mesropa on .

A quick expression to generate numbers such as the gain value of a grade.

Either of these values will generate a value from 0 to 1.

random() or random(frame)

if you want to have the values from 0 to 2  

2*random()

For generating from 1 to 2

1+random()

Comments   

 
+1 # rajavel Spear 2011-11-16 21:39
It doesn't limit values between 1 and 2 if we add exp 1+2*random() . as sometimes
it jumps outside those values. Know why ?
 
 
+4 # Alexandr Pustika 2011-12-11 06:23
to limit values between 1 and 2: floor(1+2*rando m())
 

You have no rights to post comments

We have 4388 guests and 133 members online