function ip_geoloc_random in IP Geolocation Views & Maps 7
Same name and namespace in other branches
- 8 ip_geoloc_api.inc \ip_geoloc_random()
Generate a random number uniformly distributed between supplied limits.
@ee http://php.net/manual/en/function.mt-getrandmax.php
Parameters
float $min:
float $max:
Return value
float
1 call to ip_geoloc_random()
- ip_geoloc_add_random_displacement in ./
ip_geoloc_api.inc - Return a random point within the circle centered on the supplied location.
File
- ./
ip_geoloc_api.inc, line 818 - API functions of IP geolocation module
Code
function ip_geoloc_random($min = 0, $max = 1) {
return $min + mt_rand() / mt_getrandmax() * ($max - $min);
}