Exemplo n.º 1
0
        private void LoadConstants()
        {
            Variables = new Dictionary <string, double> {
                { "pi", Math.PI },
                { "e", Math.E },
                { ANSWER_VAR, 0 }
            };

            OnVariableStore?.Invoke(this, new EventArgs());
        }
Exemplo n.º 2
0
        public void SetVariable(string name, double val)
        {
            if (Variables.ContainsKey(name))
            {
                Variables[name] = val;
            }
            else
            {
                Variables.Add(name, val);
            }

            OnVariableStore?.Invoke(this, new EventArgs());
        }