MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _speedlimit

Method _speedlimit

galleries/examples/event_handling/pong_sgskip.py:120–129  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

118 self.vy *= 5.0
119
120 def _speedlimit(self):
121 if self.vx > self.vmax:
122 self.vx = self.vmax
123 if self.vx < -self.vmax:
124 self.vx = -self.vmax
125
126 if self.vy > self.vmax:
127 self.vy = self.vmax
128 if self.vy < -self.vmax:
129 self.vy = -self.vmax
130
131
132class Game:

Callers 2

_resetMethod · 0.95
updateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected