PHP Classes

File: usage.txt

Recommend this page to a friend!
  Classes of freak  >  Rand  >  usage.txt  >  Download  
File: usage.txt
Role: Documentation
Content type: text/plain
Description: Readme first
Class: Rand
Generate random numbers
Author: By
Last change: tipo
Date: 14 years ago
Size: 985 bytes
 

Contents

Class file image Download
USAGE: $var = new Rand(); $var->frand(#) - returns a Positive number between 0 and #. example: $var->frand(5); $var->frand(#1, #2) - returns a Positive number between #1 and #2. example: $var->frand(15, 4); $var->frand(#1, #2, #3) - returns a Positive floating number between #1 and #2 when the floating part's length is maximum #3 number of digits. example: $var->frand(15, 0, 3); example: $var->frand(15, 4, 3); $var->frand(#1, #2, #3, false) - the "false" indicates that the function may also return a Negative value. example: $var->frand(15, 0, 0, false); example: $var->frand(15, 0, 3, false); example: $var->frand(15, 9, 0, false); $var->frand(#1, #2, #3, false/true, true) - the last "true" indicates whether the function should or not leave a trace. example: $var->frand(15, 9, 0, false, true); example: $var->frand(15, 9, 0, true, true); example: $var->frand(15, 0, 3, false, true);