mirror of
https://github.com/3b1b/manim.git
synced 2025-09-19 04:41:56 +00:00
Make sure normalize can take in a list
This commit is contained in:
parent
289d822a92
commit
1b0056f05d
1 changed files with 1 additions and 1 deletions
|
@ -103,7 +103,7 @@ def project_along_vector(point, vector):
|
|||
def normalize(vect, fall_back=None):
|
||||
norm = get_norm(vect)
|
||||
if norm > 0:
|
||||
return vect / norm
|
||||
return np.array(vect) / norm
|
||||
else:
|
||||
if fall_back is not None:
|
||||
return fall_back
|
||||
|
|
Loading…
Add table
Reference in a new issue