MCPcopy Index your code
hub / github.com/google-deepmind/alphageometry / distance

Method distance

numericals.py:217–219  ·  view source on GitHub ↗
(self, p: Point)

Source from the content-addressed store, hash-verified

215 return line_circle_intersection(self, obj)
216
217 def distance(self, p: Point) -> float:
218 a, b, c = self.coefficients
219 return abs(self(p.x, p.y)) / math.sqrt(a * a + b * b)
220
221 def __call__(self, x: Point, y: Point = None) -> float:
222 if isinstance(x, Point) and y is None:

Callers 15

test_sketch_2l1cMethod · 0.45
test_sketch_3peqMethod · 0.45
test_sketch_bisectMethod · 0.45
test_sketch_blineMethod · 0.45
test_sketch_circleMethod · 0.45
test_sketch_isosMethod · 0.45
test_sketch_reflectMethod · 0.45
test_sketch_risosMethod · 0.45

Calls

no outgoing calls

Tested by 15

test_sketch_2l1cMethod · 0.36
test_sketch_3peqMethod · 0.36
test_sketch_bisectMethod · 0.36
test_sketch_blineMethod · 0.36
test_sketch_circleMethod · 0.36
test_sketch_isosMethod · 0.36
test_sketch_reflectMethod · 0.36
test_sketch_risosMethod · 0.36