MCPcopy Create free account
hub / github.com/AdaCompNUS/summit / tick

Method tick

PythonAPI/examples/dynamic_weather.py:44–49  ·  view source on GitHub ↗
(self, delta_seconds)

Source from the content-addressed store, hash-verified

42 self._t = 0.0
43
44 def tick(self, delta_seconds):
45 self._t += 0.008 * delta_seconds
46 self._t %= 2.0 * math.pi
47 self.azimuth += 0.25 * delta_seconds
48 self.azimuth %= 360.0
49 self.altitude = (70 * math.sin(self._t)) - 20
50
51 def __str__(self):
52 return 'Sun(alt: %.2f, azm: %.2f)' % (self.altitude, self.azimuth)

Callers 1

tickMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected