Skip to content

Commit

Permalink
Merge pull request #130 from vpython/bruce_fixes_nov_15_20
Browse files Browse the repository at this point in the history
cannot copy object, need to copy attrs
  • Loading branch information
sspickle committed Nov 16, 2020
2 parents 139924a + 3f05305 commit 65e3a76
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vpython/cyvector.pyx
Expand Up @@ -315,7 +315,9 @@ cpdef vector adjust_up(vector oldaxis, vector newaxis, vector up, vector save_ol
return save_oldaxis
if save_oldaxis is not None:
# Restore saved oldaxis now that newaxis is nonzero
oldaxis = save_oldaxis
oldaxis._x = save_oldaxis._x # avoid creating a new vector
oldaxis._y = save_oldaxis._y
oldaxis._z = save_oldaxis._z
save_oldaxis = None
if newaxis.dot(up) != 0: # axis and up not orthogonal
angle = oldaxis.diff_angle(newaxis)
Expand Down

0 comments on commit 65e3a76

Please sign in to comment.