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

Method __init__

recipes/Python/502252_Physics/recipe-502252.py:90–95  ·  view source on GitHub ↗

Initialize the Ball object.

(self, x, y, radius)

Source from the content-addressed store, hash-verified

88 'Ball(x, y, radius) -> Ball'
89
90 def __init__(self, x, y, radius):
91 'Initialize the Ball object.'
92 self.pos = Vector(x, y)
93 self.vel = Vector(0, 0)
94 self.err = Vector(0, 0)
95 self.rad = radius
96
97 def crash(self, ball):
98 'Try to crash two balls together.'

Callers

nothing calls this directly

Calls 1

VectorClass · 0.70

Tested by

no test coverage detected