function ip_geoloc_random in IP Geolocation Views & Maps 8
Same name and namespace in other branches
- 7 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
2 calls to ip_geoloc_random()
- IpGeoLocAPI::addRandomDisplacement in src/
Services/ IpGeoLocAPI.php - Return a random point within the circle centered on the supplied location. From: http://stackoverflow.com/a/5838991/5350316 .
- 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 813 - API functions of IP geolocation module
Code
function ip_geoloc_random($min = 0, $max = 1) {
return $min + mt_rand() / mt_getrandmax() * ($max - $min);
}