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

Method is_perp

numericals.py:232–235  ·  view source on GitHub ↗
(self, other: Line)

Source from the content-addressed store, hash-verified

230 return abs(a * y - b * x) < ATOM
231
232 def is_perp(self, other: Line) -> bool:
233 a, b, _ = self.coefficients
234 x, y, _ = other.coefficients
235 return abs(a * x + b * y) < ATOM
236
237 def cross(self, other: Line) -> float:
238 a, b, _ = self.coefficients

Callers 12

check_perpFunction · 0.95
test_sketch_2l1cMethod · 0.80
test_sketch_blineMethod · 0.80
test_sketch_rectangleMethod · 0.80
test_sketch_reflectMethod · 0.80
test_sketch_risosMethod · 0.80
test_sketch_rotaten90Method · 0.80
test_sketch_rotatep90Method · 0.80
test_sketch_squareMethod · 0.80
test_sketch_isquareMethod · 0.80

Calls

no outgoing calls

Tested by 11

test_sketch_2l1cMethod · 0.64
test_sketch_blineMethod · 0.64
test_sketch_rectangleMethod · 0.64
test_sketch_reflectMethod · 0.64
test_sketch_risosMethod · 0.64
test_sketch_rotaten90Method · 0.64
test_sketch_rotatep90Method · 0.64
test_sketch_squareMethod · 0.64
test_sketch_isquareMethod · 0.64