MCPcopy Create free account
hub / github.com/ActiveState/code / update

Method update

recipes/Python/520585_VectorObject/recipe-520585.py:22–27  ·  view source on GitHub ↗
(self,time=1)

Source from the content-addressed store, hash-verified

20 self.d = _rad(direction)
21
22 def update(self,time=1):
23 distance = self.s*time
24 y = (_sin(self.d))*distance
25 x = (_cos(self.d))*distance
26 self.x += x
27 self.y += y
28
29 def addspeed(self,speed):
30 self.s += speed

Callers 5

change_reportFunction · 0.45
recipe-520593.pyFile · 0.45
__call__Method · 0.45
CurryClass · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected