You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
415 B

<?php
/*
* Created on 01.09.2015
*
* @copyright (c) 2009 animegame.eu
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
*
*/
/**
* As mt_random does not accept $max < $min this wrapper ensures that this is still possible
* for the legacy code
*/
function mt_random_wrapper($min, $max) {
if ($max < $min) {
return mt_rand ( $max, $min );
}
return mt_rand ( $min, $max );
}