MCPcopy Index your code
hub / github.com/clips/pattern / contains

Method contains

pattern/graph/__init__.py:188–192  ·  view source on GitHub ↗

Returns True if the given coordinates (x, y) are inside the node radius.

(self, x, y)

Source from the content-addressed store, hash-verified

186 self.y + self.radius)
187
188 def contains(self, x, y):
189 """ Returns True if the given coordinates (x, y) are inside the node radius.
190 """
191 return abs(self.x - x) < self.radius*2 and \
192 abs(self.y - y) < self.radius*2
193
194 def __repr__(self):
195 return "%s(id=%s)" % (self.__class__.__name__, repr(self.id))

Callers 3

node_atMethod · 0.80
graph.jsFile · 0.80
test_canvas.jsFile · 0.80

Calls 1

absFunction · 0.50

Tested by

no test coverage detected