/// <summary> /// numeric floor, or lowercase /// </summary> /// <param name="l"></param> /// <returns></returns> public static CValue Floor(CValue l) { if (l.IsNumeric) { return new CValue(Math.Floor(l.NumericValue)); } return new CValue(l.ToString().ToLower()); }
/// <summary> /// Numeric exponent, or NaN /// </summary> public static CValue Pow(CValue l, CValue r) { if (l.IsNumeric && r.IsNumeric) { return new CValue((decimal)Math.Pow((double)l.NumericValue, (double)r.NumericValue)); } return new CValue(); }
public static CValue Ceil(CValue l) { if (l.IsNumeric) { return new CValue(Math.Ceiling(l.NumericValue)); } return new CValue(l.ToString().ToUpper()); }