| Package | system.numeric |
| Class | public class PRNG |
| Inheritance | PRNG Object |
| Property | Defined By | ||
|---|---|---|---|
| value : uint
The current random value with a 31 bit unsigned integer between 1 and 0X7FFFFFFE inclusive (don't use 0). | PRNG | ||
| Method | Defined By | ||
|---|---|---|---|
PRNG(value:uint = 0)
Creates a new PRNG instance. | PRNG | ||
randomInt():int
Provides the next pseudorandom number as an unsigned integer (31 bits)
| PRNG | ||
randomIntByMinMax(min:Number = 0, max:Number = 1):int
Provides the next pseudorandom number as an unsigned integer (31 bits) betweeen a minimum value and maximum value. | PRNG | ||
randomIntByRange(r:Range):int
Provides the next pseudorandom number as an unsigned integer (31 bits) betweeen a given range. | PRNG | ||
randomNumber():Number
Provides the next pseudo random number as a float between nearly 0 and nearly 1.0. | PRNG | ||
randomNumberByMinMax(min:Number = 0, max:Number = 1):Number
Provides the next pseudo random number as a float between a minimum value and maximum value. | PRNG | ||
randomNumberByRange(r:Range):Number
Provides the next pseudo random number as a float between a given range. | PRNG | ||
toString():String
Returns the String representation of the object. | PRNG | ||
valueOf():int
Returns the primitive value of the object. | PRNG | ||
| value | property |
value:uintThe current random value with a 31 bit unsigned integer between 1 and 0X7FFFFFFE inclusive (don't use 0).
public function get value():uint public function set value(value:uint):void| PRNG | () | Constructor |
public function PRNG(value:uint = 0)Creates a new PRNG instance.
Parametersvalue:uint (default = 0) — The optional default value of the PRNG object, if the passed-in value is >=1 a random value is generated with the Math.random() static method (default 0).
|
| randomInt | () | method |
public function randomInt():intProvides the next pseudorandom number as an unsigned integer (31 bits)
Returnsint |
| randomIntByMinMax | () | method |
public function randomIntByMinMax(min:Number = 0, max:Number = 1):intProvides the next pseudorandom number as an unsigned integer (31 bits) betweeen a minimum value and maximum value.
Parameters
min:Number (default = 0) | |
max:Number (default = 1) |
int |
| randomIntByRange | () | method |
public function randomIntByRange(r:Range):intProvides the next pseudorandom number as an unsigned integer (31 bits) betweeen a given range.
Parameters
r:Range |
int |
| randomNumber | () | method |
public function randomNumber():NumberProvides the next pseudo random number as a float between nearly 0 and nearly 1.0.
ReturnsNumber |
| randomNumberByMinMax | () | method |
public function randomNumberByMinMax(min:Number = 0, max:Number = 1):NumberProvides the next pseudo random number as a float between a minimum value and maximum value.
Parameters
min:Number (default = 0) | |
max:Number (default = 1) |
Number |
| randomNumberByRange | () | method |
public function randomNumberByRange(r:Range):NumberProvides the next pseudo random number as a float between a given range.
Parameters
r:Range |
Number |
| toString | () | method |
public function toString():StringReturns the String representation of the object.
ReturnsString — the String representation of the object.
|
| valueOf | () | method |
public function valueOf():intReturns the primitive value of the object.
Returnsint — the primitive value of the object.
|