Package | com.cyntaxic.cyntils |
Class | public class CynRandom |
Inheritance | CynRandom Object |
CynRandom
class contains static functions for
randomization.
Method | Defined By | ||
---|---|---|---|
arrayOfIndex(length:int = 0):Array [static]
Returns an array of zero based indexed numbers randomly. | CynRandom | ||
arrayOfSingleDigits(length:int = 0):Array [static]
Returns an array of single digit numbers randomly. | CynRandom | ||
numberByLength(length:int = 0):Number [static]
Returns a random number a specified number of digits long. | CynRandom | ||
numberInRange(low:Number, high:Number, integer:Boolean = true):Number [static]
Returns a random number in range. | CynRandom |
arrayOfIndex | () | method |
public static function arrayOfIndex(length:int = 0):Array
Returns an array of zero based indexed numbers randomly.
Parameters
length:int (default = 0 ) — The length of the array to be generated.
|
Array — The array of random numbers in length range.
|
arrayOfSingleDigits | () | method |
public static function arrayOfSingleDigits(length:int = 0):Array
Returns an array of single digit numbers randomly.
Parameters
length:int (default = 0 ) — The length of the array to be generated.
|
Array — The array of single random numbers in length range.
|
numberByLength | () | method |
public static function numberByLength(length:int = 0):Number
Returns a random number a specified number of digits long.
Parameters
length:int (default = 0 ) — The length of digits to return.
|
Number — The random number generated.
|
numberInRange | () | method |
public static function numberInRange(low:Number, high:Number, integer:Boolean = true):Number
Returns a random number in range.
Parameters
low:Number — The low range.
| |
high:Number — The high range.
| |
integer:Boolean (default = true ) — If false, allow floating point number otherwise integer.
|
Number — The random number in range generated.
|