Пример #1
0
 /// <summary>
 /// resets the context to its defaults
 /// </summary> 
 public void Reset()
 {
     inScope = new List<Variables>();
     Functions = new Functions();
     Globals = new Variables();
     Functions.InitDefaults();
     Globals["pi"]  = 3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679; // Math.Pi is not very precise
     Globals["e"]   = 2.7182818284590452353602874713526624977572470936999595749669676277240766303535475945713821785251664274;  // Math.E is not very precise
     Globals["phi"] = 1.6180339887498948482045868343656381177203091798057628621354486227052604628189024497072072041893911374;  // no Math.Phi at all
 }