예제 #1
0
 /**
  * Randomize the matrix.
  * 
  * @param
  *        	min Minimum random value.
  * @param
  *        	max Maximum random value.
  */
 public function randomize($min, $max)
 {
     for ($row = 0; $row < getRows(); ++$row) {
         for ($col = 0; $col < getCols(); $col) {
             $this->matrix[$row][$col] = RangeRandomizer::randomize($min, $max);
         }
     }
 }
 /**
  * Returns a random number in the range between min and max.
  * 
  * @param
  *        	int min The minimum desired random number.
  * @param
  *        	int max The maximum desired random number.
  * @return int The random number.
  */
 public static function randomInt($min, $max)
 {
     return intval(RangeRandomizer::randomizeRange($min, $max + 1));
 }