示例#1
0
 def random(min=-1, max=1):
     """Return a random force."""
     vector = Vector.random(min, max)
     return Force(vector)
示例#2
0
 def random(min=-1, max=1):
     """Create a random motion using optional minimum and maximum."""
     position = Vector.random(min, max)
     velocity = Vector.random(min, max)
     acceleration = Vector.random(min, max)
     return Motion(position, velocity, acceleration)