Check if the angle is equal to a certain constant.
(self, points: list[Point], verbose: bool = False)
| 1951 | return add |
| 1952 | |
| 1953 | def check_aconst(self, points: list[Point], verbose: bool = False) -> bool: |
| 1954 | """Check if the angle is equal to a certain constant.""" |
| 1955 | a, b, c, d, nd = points |
| 1956 | _ = verbose |
| 1957 | if isinstance(nd, str): |
| 1958 | name = nd |
| 1959 | else: |
| 1960 | name = nd.name |
| 1961 | num, den = name.split('pi/') |
| 1962 | ang, _ = self.get_or_create_const_ang(int(num), int(den)) |
| 1963 | |
| 1964 | ab = self._get_line(a, b) |
| 1965 | cd = self._get_line(c, d) |
| 1966 | if not ab or not cd: |
| 1967 | return False |
| 1968 | |
| 1969 | if not (ab.val and cd.val): |
| 1970 | return False |
| 1971 | |
| 1972 | for ang1, _, _ in gm.all_angles(ab._val, cd._val): |
| 1973 | if self.is_equal(ang1, ang): |
| 1974 | return True |
| 1975 | return False |
| 1976 | |
| 1977 | def check_acompute(self, points: list[Point]) -> bool: |
| 1978 | """Check if an angle has a constant value.""" |
no test coverage detected