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

Method append

Tools/Spawnpoint-Clustering/cluster.py:51–62  ·  view source on GitHub ↗
(self, spawnpoint)

Source from the content-addressed store, hash-verified

49 return len(self._spawnpoints)
50
51 def append(self, spawnpoint):
52 # update centroid
53 f = len(self._spawnpoints) / (len(self._spawnpoints) + 1.0)
54 self.centroid = utils.intermediate_point(spawnpoint.position, self.centroid, f)
55
56 self._spawnpoints.append(spawnpoint)
57
58 if spawnpoint.time < self.min_time:
59 self.min_time = spawnpoint.time
60
61 if spawnpoint.time > self.max_time:
62 self.max_time = spawnpoint.time
63
64 def simulate_centroid(self, spawnpoint):
65 f = len(self._spawnpoints) / (len(self._spawnpoints) + 1.0)

Callers 15

clusterFunction · 0.95
getFortsFunction · 0.80
makeWildPokemonFunction · 0.80
api_loginFunction · 0.80
api_scanFunction · 0.80
initSidebarFunction · 0.80
tableSortFunction · 0.80
get_argsFunction · 0.80
addMethod · 0.80
checkpointMethod · 0.80
get_activeMethod · 0.80
get_active_by_idMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected