mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
Added simple R3_to_complex function
This commit is contained in:
parent
983f739553
commit
4f356d7e8f
1 changed files with 3 additions and 0 deletions
|
@ -224,6 +224,9 @@ def adjacent_pairs(objects):
|
|||
def complex_to_R3(complex_num):
|
||||
return np.array((complex_num.real, complex_num.imag, 0))
|
||||
|
||||
def R3_to_complex(point):
|
||||
return complex(*point[:2])
|
||||
|
||||
def tuplify(obj):
|
||||
if isinstance(obj, str):
|
||||
return (obj,)
|
||||
|
|
Loading…
Add table
Reference in a new issue