Generates a random integer between the given $min and $max values.

@param int $min Lower limit.
@param int $max Upper limit

@throws CryptException
@return int Random number between $min and $max.
346826
public function generateRandomInt($min, $max)
    {
        try {
            return $this->driverInstance->generateRandomInt($min, $max);
        } catch (\Exception $e) {
            throw new CryptException($e->getMessage());
        }
    }
572276
public function getInteger($min, $max, $strong = false)
    {
        return Rand::getInteger($min, $max, $strong);
    }
970070
public static function between($min, $max): Compare
    {
        $value = $min > $max ? [$max, $min] : [$min, $max];
        return new Compare('bt', $value);
    }
959237
public static int random(final int min, final int max) {
        return min + new java.security.SecureRandom().nextInt(max - min + 1);
    }
968595
public function integerIsBetween(int $integer, int $min, int $max): bool
    {
        return (($integer >= $min) && ($integer <= $max));
    }
1356664
public function setMinMax($min,$max=null)
    {
       $this->min = $min; 
       $this->max = $max; 
    }
1164908
public static function numberLimit($val, $min, $max)
    {
        return ($val > $min ? ($val < $max ? $val : $max) : $min);
    }
1215465
public function getRand($min = 0, $max = 0x7fffffff)
    {
        $t = ($this->x ^ ($this->x << 11)) & 0x7fffffff;
        $this->x = $this->y;
        $this->y = $this->z;
        $this->z = $this->w;
        $this->w = ( $this->w ^ ($this->w >> 19) ^ ( $t ^ ( $t >> 8 )) );
        return $this->w % ($max - $min + 1) + $min;
    }
209097
public static function ruleLenRange($min, $max)
    {
        return function ($input) use ($min, $max) {
            return strlen($input) >= $min && strlen($input) <= $max;
        };
    }
15237
public static function between($n, $min, $max, $inclusive = true){
		
		if($inclusive){
			return static::greaterThanOrEqualTo($n, $min) &&
					static::lessThanOrEqualTo($n, $max);
		}
		
		return static::greaterThan($n, $min) &&
				static::lessThan($n, $$max);
		
	}
1284050
public function vBetween(Int $min = 0, Int $max = 0)
    {
        return $this->setJavascriptValidation
        (
            'ZNValidationBetween', 
            ['betweenBoth' => [':p1' => $min, ':p2' => $max]],
            ['betweenBoth' => [$min, $max]],
            [$min, $max]  
        );
    }
302830
public static function isRequiredNumericRange($value, $min, $max)
    {
        return is_numeric($value) && $min <= $value && $max >= $value;
    }
1251880
public static function random($min, $max = null)
    {
        if (String::isEmpty($max) ||
            $max > getrandmax()) {
            $max = getrandmax();
        }

        return rand($min, $max);
    }
1066969
public function between($min, $max, $msg)
    {
        $this->min($min, $msg);
        $this->max($max, $msg);
        return $this;
    }
1207589
public static function random_int(int $min=0, int $max=1) {
		if ($min > $max) {
			static::switcheroo($min, $max);
		}

		return \random_int($min, $max);
	}
1669
public function isInteger($number, int $min = null, int $max = null): bool
    {
        return isset($min) || isset($max)
            ? filter_var($number, FILTER_VALIDATE_INT, $this->getIntegerOptionsBetween($min, $max))
            : filter_var($number, FILTER_VALIDATE_INT);
    }
918370
protected function rand($min, $max)
    {
        if (!is_array($this->fingerprint)) {
            $this->fingerprint = array();
        }

        if ($this->useFingerprint) {
            $value = current($this->fingerprint);
            next($this->fingerprint);
        } else {
            $value = mt_rand($min, $max);
            $this->fingerprint[] = $value;
        }

        return $value;
    }