def random(min=-1, max=1): """Return a random force.""" vector = Vector.random(min, max) return Force(vector)
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)