Skip to content

Commit

Permalink
Resolvesd PR aerospaceresearch#231
Browse files Browse the repository at this point in the history
removed the bug and now we can evaluate pi's value from gui
  • Loading branch information
gr8geek authored Feb 22, 2020
1 parent b55ab4a commit 5d086f6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion visma/io/tokenize.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def getTerms(eqn):
terms = []
while x < len(eqn):

if ('a' <= eqn[x] <= 'z') or ('A' <= eqn[x] <= 'Z') or eqn[x] in greek:
if ('a' <= eqn[x] <= 'z') or ('A' <= eqn[x] <= 'Z') or eqn[x] in greek or eqn[x] in constants:

buf = eqn[x]
if x + 3 < len(eqn):
Expand Down Expand Up @@ -103,6 +103,10 @@ def getTerms(eqn):
terms.append("exp")
x += 1
continue
elif eqn[x] ==constants[0]:
terms.append(str(math.pi))
x += 1
continue
elif eqn[x] == 'i':
terms.append("iota")
x += 1
Expand Down

0 comments on commit 5d086f6

Please sign in to comment.