Browse Source

refactoring: simplified return statement for exponent 1

remotes/origin/feature/feature-read-math-function-added-funktions
fd7794 11 months ago
parent
commit
8f90bcd45a
  1. 2
      src/main/py/read_math_function.py

2
src/main/py/read_math_function.py

@ -86,7 +86,7 @@ def simplify_exponential_function(type, function):
if new_exponent == 0:
return [str(new_coefficient)]
elif new_exponent == 1:
result = [f"{new_coefficient}x"]
return [f"{new_coefficient}x"]
else:
result = [f"{new_coefficient}x^{new_exponent}"]
return result
Loading…
Cancel
Save