Exemple #1
0
 public override bool evaluate(Bracket b)
 {
     if (evaluateSingle(b))
     {
         if (b.contains(UNLIMITED_VALUE.ToString().Trim()))
         {
             return(false);
         }
         return(true);
     }
     return(false);
 }
Exemple #2
0
 public override bool evaluate(Bracket b)
 {
     if (evaluateSingle(b))
     {
         if (b.contains(UNLIMITED_VALUE.ToString().Trim()))
         {
             return(false);
         }
         double d = convertToNumber(b.Childs[0]);
         if (d < -1 || d > 1)
         {
             return(false);
         }
         return(true);
     }
     return(false);
 }
Exemple #3
0
 public override object calculate(Bracket b)
 {
     if (evaluate(b))
     {
         if (b.Childs[0].ToString() == UNLIMITED_VALUE.ToString() || b.Childs[0].ToString() == "-" + UNLIMITED_VALUE)
         {
             if (b.Childs[0].ToString() == UNLIMITED_VALUE.ToString())
             {
                 return(0d);
             }
             else
             {
                 return(Math.PI);
             }
         }
         else
         {
             double d = convertToNumber(b.Childs[0]);
             return(Math.Atan(d));
         }
     }
     return(null);
 }
Exemple #4
0
 public override bool evaluate(Bracket b)
 {
     if (evaluateSingle(b))
     {
         if (b.contains(UNLIMITED_VALUE))
         {
             return(false);
         }
         return(true);
     }
     else
     {
         if (b.contains(LIST_SEPARATOR.ToString()))
         {
             if (b.Childs.Length == 3)
             {
                 return(b.contains(UNLIMITED_VALUE.ToString().Trim()));
             }
             return(false);
         }
     }
     return(false);
 }