MCPcopy Create free account
hub / github.com/RocketMap/RocketMap / getRandomPoint

Function getRandomPoint

contrib/fake-pgo-api.py:54–59  ·  view source on GitHub ↗
(location=None, maxMeters=70)

Source from the content-addressed store, hash-verified

52
53
54def getRandomPoint(location=None, maxMeters=70):
55 origin = geopy.Point(location[0], location[1])
56 b = randint(0, 360)
57 d = math.sqrt(random()) * (float(maxMeters) / 1000)
58 destination = VincentyDistance(kilometers=d).destination(origin, b)
59 return (destination.latitude, destination.longitude)
60
61
62# TODO: This method is suuuuper inefficient.

Callers 2

makeWildPokemonFunction · 0.85
api_loginFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected