Generates a random number between two numbers

@param {int} _min
@param {int} _max
@api public
9459
function randomBetween(_min, _max) {
	var max, min;
	
	if(_min > _max){
		min = _max;	
		max = _min;
	}
	else if(_min === _max){
		return _min;
	}
	else{
		max = _max;
		min = _min;
	}
    
    var r = Math.floor(Math.random() * max) + min;
    
    if(r > max)
    	return max;
    if(r < min)
    	return min;
    else
    	return r;
}
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;
    }
920253
function randomBetween(min, max) {
  return Math.round(min + Math.random() * (max - min));
}
1207589
public static function random_int(int $min=0, int $max=1) {
		if ($min > $max) {
			static::switcheroo($min, $max);
		}

		return \random_int($min, $max);
	}
588145
public static double random(double min, double max) {
        assert max > min;
        return min + Math.random() * (max - min);
    }
463410
public static function range($value, $min, $max)
    {
        return Validator::int()->between($min, $max)->validate($value);
    }
806867
function Random(Max, Min){
    var Range = Max - Min;
    var Rand = Math.random();
    return (Min + Math.round(Rand * Range));
}
688153
function(arr) {
        return {
            min: Math.min.apply(null, arr),
            max: Math.max.apply(null, arr)
        };
    }
1017478
static int randomNumber(int minimum, int maximum) {
        assert minimum < maximum;
        double fraction = PlatformDependent.threadLocalRandom().nextDouble();

        // the idea here is that nextDouble gives us a random value
        //
        //              0 <= fraction <= 1
        //
        // the distance from min to max declared as
        //
        //              dist = max - min
        //
        // satisfies the following
        //
        //              min + dist = max
        //
        // taking into account
        //
        //         0 <= fraction * dist <= dist
        //
        // we've got
        //
        //       min <= min + fraction * dist <= max
        return (int) (minimum + fraction * (maximum - minimum));
    }
495292
function (min, max) {
			if (min === undefined && max === undefined) return getRandom();
	
	
			if (typeof min !== 'number') throw new shine.Error("bad argument #1 to 'random' (number expected)");
	
			if (max === undefined) {
				max = min;
				min = 1;
	
			} else if (typeof max !== 'number') {
				throw new shine.Error("bad argument #2 to 'random' (number expected)");
			}
	
			if (min > max) throw new shine.Error("bad argument #2 to 'random' (interval is empty)");
			return Math.floor(getRandom() * (max - min + 1) + min);
		}
1248493
function clamp(num, min, max) {
        return num < min?  min
             : num > max?  max
             :             num
    }
302524
function clampNumber(number, min, max) {
  return Math.max(min, Math.min(max, number));
}
18093
public function _validation_numeric_between($val, $min_val, $max_val)
	{
		return $this->_empty($val) or (floatval($val) >= floatval($min_val) and floatval($val) <= floatval($max_val));
	}
981716
public static function limit($number, $min, $max): int
    {
        return self::max(self::min($number, $min), $max);
    }
178884
def random(self, max_number=None):
        
        min_number = self.obj
        if max_number is None:
            min_number = 0
            max_number = self.obj
        return random.randrange(min_number, max_number)
1095587
function inRange (value, min, max) {
  const int = parseInt(value, 10)

  return (
    `${int}` === `${value.replace(/^0/, '')}` &&
    int >= min &&
    int <= max
  )
}
917294
function (value, min, max) {
        min = min | 0;
        let length = ((value || '') + '').length;
        if (length < min) {
            return false;
        }
        if (max && length > max) {
            return false;
        }
        return true;
    }