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

Method __call__

numericals.py:221–225  ·  view source on GitHub ↗
(self, x: Point, y: Point = None)

Source from the content-addressed store, hash-verified

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:
223 return self(x.x, x.y)
224 a, b, c = self.coefficients
225 return x * a + y * b + c
226
227 def is_parallel(self, other: Line) -> bool:
228 a, b, _ = self.coefficients

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected