Skip to content

Commit

Permalink
Fixed division by zero error.
Browse files Browse the repository at this point in the history
  • Loading branch information
gedeschaines committed Dec 13, 2023
1 parent c453743 commit d29efe5
Show file tree
Hide file tree
Showing 3 changed files with 1,387 additions and 3 deletions.
6 changes: 3 additions & 3 deletions draw3D.py
Original file line number Diff line number Diff line change
Expand Up @@ -1059,7 +1059,7 @@ def MainLoop(self):
line = self.lfnt.readline()
continue
tsec = float(words[0])
ktot = int(words[1])
ktot = int(words[1])
XM = float(words[2])
YM = float(words[3])
ZM = float(words[4])
Expand Down Expand Up @@ -1179,8 +1179,8 @@ def MainLoop(self):
UXTM = DXTM/RTM
UYTM = DYTM/RTM
UZTM = DZTM/RTM
else:
# Use missile velocity direction vector
elif ktot > -1:
# Use last valid missile velocity direction vector.
DXTM = XM - last_XM
DYTM = YM - last_YM
DZTM = ZM - last_ZM
Expand Down
Loading

0 comments on commit d29efe5

Please sign in to comment.