MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / __add__

Method __add__

tools/python-3.11.9-amd64/Lib/turtle.py:253–254  ·  view source on GitHub ↗
(self, other)

Source from the content-addressed store, hash-verified

251 def __new__(cls, x, y):
252 return tuple.__new__(cls, (x, y))
253 def __add__(self, other):
254 return Vec2D(self[0]+other[0], self[1]+other[1])
255 def __mul__(self, other):
256 if isinstance(other, Vec2D):
257 return self[0]*other[0]+self[1]*other[1]

Callers

nothing calls this directly

Calls 1

Vec2DClass · 0.85

Tested by

no test coverage detected