Пример #1
0
        public string Set(DNumber index, DChar with)
        {
            var chars = value.ToCharArray();

            chars[index.ToInt()] = with.value;
            return(new string(chars));
        }
Пример #2
0
 public double NthRoot(DNumber value, DNumber root)
 {
     if (root.ToFloat() % 2 == 0 || value.ToFloat() >= 0)
     {
         // if even
         return(Math.Pow(value.ToFloat(), 1.0f / root.ToFloat()));
     }
     else
     {
         // if odd
         return(-Math.Pow(-value.ToFloat(), 1.0f / root.ToFloat()));
     }
 }
Пример #3
0
 public double Atan(DNumber n)
 {
     return(Math.Atan(n.ToFloat()));
 }
Пример #4
0
 public double Acos(DNumber n)
 {
     return(Math.Acos(n.ToFloat()));
 }
Пример #5
0
 public DObject Set(DNumber index, DObject value)
 {
     return(items[index.ToInt()].Value = value);
 }
Пример #6
0
 public double Min(DNumber n1, DNumber n2)
 {
     return(Math.Min(n1.ToFloat(), n2.ToFloat()));
 }
Пример #7
0
 public double Floor(DNumber n)
 {
     return(Math.Floor(n.ToFloat()));
 }
Пример #8
0
 public double Cosh(DNumber n)
 {
     return(Math.Cosh(n.ToFloat()));
 }
Пример #9
0
 public double Round(DNumber n)
 {
     return(Math.Round(n.ToFloat()));
 }
Пример #10
0
 public string Insert(DNumber index, DString with) => value.Insert(index.ToInt(), value.ToString());
Пример #11
0
 public string Substring(DNumber index) => value.Substring(index.ToInt());
Пример #12
0
 public string Remove(DNumber index) => value.Remove(index.ToInt());
Пример #13
0
 public void Remove(DNumber index) => items.RemoveAt(index.ToInt());
Пример #14
0
 public double Atan2(DNumber n1, DNumber n2)
 {
     return(Math.Atan2(n1.ToFloat(), n2.ToFloat()));
 }
Пример #15
0
 public int Sign(DNumber n)
 {
     return(Math.Sign(n.ToFloat()));
 }
Пример #16
0
 public double Ceiling(DNumber n)
 {
     return(Math.Ceiling(n.ToFloat()));
 }
Пример #17
0
 public double Sinh(DNumber n)
 {
     return(Math.Sinh(n.ToFloat()));
 }
Пример #18
0
 public double Exp(DNumber n)
 {
     return(Math.Exp(n.ToFloat()));
 }
Пример #19
0
 public double Sqrt(DNumber n)
 {
     return(Math.Sqrt(n.ToFloat()));
 }
Пример #20
0
 public double Log(DNumber n)
 {
     return(Math.Log10(n.ToFloat()));
 }
Пример #21
0
 public double Tanh(DNumber n)
 {
     return(Math.Tanh(n.ToFloat()));
 }
Пример #22
0
 public double Limit(DNumber value, DNumber lower, DNumber upper)
 {
     return(Math.Min(upper.ToFloat(), Math.Max(lower.ToFloat(), value.ToFloat())));
 }
Пример #23
0
 public DObject Get(DNumber index)
 {
     return(items[index.ToInt()].Value);
 }