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

Method add_const_angle

ar.py:612–623  ·  view source on GitHub ↗
(
      self, d1: gm.Direction, d2: gm.Direction, ang: float, dep: pr.Dependency
  )

Source from the content-addressed store, hash-verified

610 return self.add_const_angle(d1, d2, 0, dep)
611
612 def add_const_angle(
613 self, d1: gm.Direction, d2: gm.Direction, ang: float, dep: pr.Dependency
614 ) -> None:
615 if ang and d2._obj.num > d1._obj.num: # pylint: disable=protected-access
616 d1, d2 = d2, d1
617 ang = 180 - ang
618
619 d1, d2 = self.get_name([d1, d2])
620
621 num, den = simplify(ang, 180)
622 ang = frac(int(num), int(den))
623 return super().add_eq3(d1, d2, ang, dep)
624
625 def add_eqangle(
626 self,

Callers 2

add_paraMethod · 0.95
add_algebraMethod · 0.80

Calls 3

get_nameMethod · 0.80
add_eq3Method · 0.80
simplifyFunction · 0.70

Tested by

no test coverage detected