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

Method __mul__

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

Return the product of vector multiplication.

(self, number)

Source from the content-addressed store, hash-verified

42 return Vector(self.x - vector.x, self.y - vector.y)
43
44 def __mul__(self, number):
45 'Return the product of vector multiplication.'
46 return Vector(self.x * number, self.y * number)
47
48 def __div__(self, number):
49 'Return the quotient of vector division.'

Callers

nothing calls this directly

Calls 1

VectorClass · 0.70

Tested by

no test coverage detected