private void LoadConstants() { Variables = new Dictionary <string, double> { { "pi", Math.PI }, { "e", Math.E }, { ANSWER_VAR, 0 } }; OnVariableStore?.Invoke(this, new EventArgs()); }
public void SetVariable(string name, double val) { if (Variables.ContainsKey(name)) { Variables[name] = val; } else { Variables.Add(name, val); } OnVariableStore?.Invoke(this, new EventArgs()); }