MCPcopy Create free account
hub / github.com/google-deepmind/alphageometry / close

Method close

numericals.py:81–82  ·  view source on GitHub ↗
(self, point: Point, tol: float = 1e-12)

Source from the content-addressed store, hash-verified

79 return 'P({},{})'.format(self.x, self.y)
80
81 def close(self, point: Point, tol: float = 1e-12) -> bool:
82 return abs(self.x - point.x) < tol and abs(self.y - point.y) < tol
83
84 def midpoint(self, p: Point) -> Point:
85 return Point(0.5 * (self.x + p.x), 0.5 * (self.y + p.y))

Callers 6

test_sketch_shiftMethod · 0.80
checkMethod · 0.80
intersectMethod · 0.80
intersectMethod · 0.80
drawFunction · 0.80
reduceFunction · 0.80

Calls

no outgoing calls

Tested by 1

test_sketch_shiftMethod · 0.64