Esempio n. 1
0
 public string ToQuantity(string value, object quantity)
 {
     return(ExecuteUtils.Execute(Context, quantity,
                                 (quantityAsInt) => value.ToQuantity(quantityAsInt),
                                 (quantityAsLong) => value.ToQuantity(quantityAsLong),
                                 (quantityAsInt) => value.ToQuantity(quantityAsInt)
                                 ));
 }
 public double Floor(object value1, object value2)
 {
     return(ExecuteUtils.Execute(Context, value1, value2, (x1, x2) => Math.Floor(1.0 * x1 / 1.0 * x2)));
 }
 public double Divide(object value1, object value2)
 {
     return(ExecuteUtils.Execute(Context, value1, value2, (x1, x2) => x1 / x2));
 }
 public double Ceiling(object value)
 {
     return(ExecuteUtils.Execute(value, x => Math.Ceiling(1.0 * x)));
 }
 public double Avg(object value1, object value2)
 {
     return(ExecuteUtils.Execute(Context, value1, value2, (x1, x2) => (x1 + x2) / 2.0));
 }
 public object Abs(object value)
 {
     return(ExecuteUtils.Execute(Context, value, Math.Abs, Math.Abs, Math.Abs));
 }
Esempio n. 7
0
 public object Min(object value1, object value2)
 {
     return(ExecuteUtils.Execute(Context, value1, value2, Math.Min, Math.Min, Math.Min));
 }
 public object Min(object value1, object value2)
 {
     return(ExecuteUtils.Execute(Context, value1, value2, (x1, x2) => Math.Min(x1, x2), (x1, x2) => Math.Min(x1, x2), (x1, x2) => Math.Min(x1, x2)));
 }
 public double Round(object value)
 {
     return(ExecuteUtils.Execute(value, Math.Round));
 }
 public object Power(object value1, object value2)
 {
     return(ExecuteUtils.Execute(Context, value1, value2, Math.Pow));
 }
 public bool NotEqual(object value1, object value2)
 {
     return(ExecuteUtils.Execute(Context, value1, value2, (x1, x2) => x1 != x2, (x1, x2) => x1 != x2, (x1, x2) => x1 != x2));
 }
 public object Multiply(object value1, object value2)
 {
     return(ExecuteUtils.Execute(Context, value1, value2, (x1, x2) => x1 * x2, (x1, x2) => x1 * x2, (x1, x2) => x1 * x2));
 }
Esempio n. 13
0
 public double Divide(object value1, object value2)
 {
     return(ExecuteUtils.Execute(value1, value2, (x1, x2) => 1.0 * x1 / 1.0 * x2));
 }
 public bool GreaterThan(object value1, object value2)
 {
     return(ExecuteUtils.Execute(Context, value1, value2, (x1, x2) => x1 > x2, (x1, x2) => x1 > x2, (x1, x2) => x1 > x2));
 }
 public object Sign(object value)
 {
     return(ExecuteUtils.Execute(Context, value, Math.Sign, l => Math.Sign(l), d => Math.Sign(d)));
 }
 public bool LessThanEqual(object value1, object value2)
 {
     return(ExecuteUtils.Execute(Context, value1, value2, (x1, x2) => x1 <= x2, (x1, x2) => x1 <= x2, (x1, x2) => x1 <= x2));
 }
 public object Sqrt(object value)
 {
     return(ExecuteUtils.Execute(value, Math.Sqrt));
 }
 public object Minus(object value1, object value2)
 {
     return(ExecuteUtils.Execute(Context, value1, value2, (x1, x2) => x1 - x2, (x1, x2) => x1 - x2, (x1, x2) => x1 - x2));
 }
Esempio n. 19
0
 public object Max(object value1, object value2)
 {
     return(ExecuteUtils.Execute(Context, value1, value2, Math.Max, Math.Max, Math.Max));
 }