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

Method diff_side

numericals.py:266–271  ·  view source on GitHub ↗
(self, p1: Point, p2: Point)

Source from the content-addressed store, hash-verified

264 return None
265
266 def diff_side(self, p1: Point, p2: Point) -> Optional[bool]:
267 d1 = self(p1.x, p1.y)
268 d2 = self(p2.x, p2.y)
269 if d1 == 0 or d2 == 0:
270 return None
271 return d1 * d2 < 0
272
273 def same_side(self, p1: Point, p2: Point) -> Optional[bool]:
274 d1 = self(p1.x, p1.y)

Callers 6

test_sketch_quadrangeMethod · 0.80
test_sketch_trapezoidMethod · 0.80
sketch_2l1cFunction · 0.80

Calls

no outgoing calls

Tested by 5

test_sketch_quadrangeMethod · 0.64
test_sketch_trapezoidMethod · 0.64