Browse Source

refactoring: added new line

remotes/origin/feature/feature-read-math-functions
fdai7763 11 months ago
parent
commit
e640d69858
  1. 1
      src/main/py/read_math_function.py

1
src/main/py/read_math_function.py

@ -53,6 +53,7 @@ def simplify_easy_math_function(type, function):
if is_string(function) == False or is_allowed_string("c", function) == True: if is_string(function) == False or is_allowed_string("c", function) == True:
return simplify_constant("c", function) return simplify_constant("c", function)
def extract_constant(function): def extract_constant(function):
coefficient, constant = function.split('x', 1) if 'x' in function else (function, '') coefficient, constant = function.split('x', 1) if 'x' in function else (function, '')
constant = constant.lstrip('+') constant = constant.lstrip('+')

Loading…
Cancel
Save