(g: Graph, s: str)
| 3034 | |
| 3035 | |
| 3036 | def create_consts_str(g: Graph, s: str) -> Union[Ratio, Angle]: |
| 3037 | if 'pi/' in s: |
| 3038 | n, d = s.split('pi/') |
| 3039 | n, d = int(n), int(d) |
| 3040 | p0, _ = g.get_or_create_const_ang(n, d) |
| 3041 | else: |
| 3042 | n, d = s.split('/') |
| 3043 | n, d = int(n), int(d) |
| 3044 | p0, _ = g.get_or_create_const_rat(n, d) |
| 3045 | return p0 |
| 3046 | |
| 3047 | |
| 3048 | def create_consts(g: Graph, p: gm.Node) -> Union[Ratio, Angle]: |
nothing calls this directly
no test coverage detected