Esempio n. 1
0
        static void Main(string[] args)
        {
            var p = new Circle(1.5);

            Console.WriteLine(p.Calculate((double r) => 2 * Math.PI * r));
            fd f = new fd((int a) =>
            {
                return(a);
            });


            var s      = new Calculation(new[] { 1, 2, 3, 4, 5 });
            int result = s.CalcSingleValue(
                (int[] array) =>
            {
                int x = 0;
                foreach (var m in array)
                {
                    x += m;
                }
                x /= array.Length;
                return(x);
            }
                );

            Console.WriteLine(result);

            Console.WriteLine(f(120));
        }
Esempio n. 2
0
 return(write1(fd, p, n));
Esempio n. 3
0
    public bool a(TextReader A_0)
    {
        this.b();
        if (A_0.ReadLine() != "uTank2 NAV 1.2")
        {
            a5.a(eChatType.Errors, "Nav file version does not match current plugin version.");
            return(false);
        }
        switch (Convert.ToInt32(A_0.ReadLine(), CultureInfo.InvariantCulture))
        {
        case 1:
            this.c = eNavType.Circular;
            break;

        case 2:
            this.c = eNavType.Linear;
            break;

        case 3:
            this.c = eNavType.Target;
            break;

        case 4:
            this.c = eNavType.Once;
            break;
        }
        if (this.c == eNavType.Target)
        {
            this.e = A_0.ReadLine();
            this.d = Convert.ToInt32(A_0.ReadLine(), CultureInfo.InvariantCulture);
            if (this.d != 0)
            {
                this.b.Add(new cg(this.d, PluginCore.cq));
            }
        }
        else
        {
            int num2 = Convert.ToInt32(A_0.ReadLine(), CultureInfo.InvariantCulture);
            for (int i = 0; i < num2; i++)
            {
                ef     ef;
                int    num4  = Convert.ToInt32(A_0.ReadLine(), CultureInfo.InvariantCulture);
                sCoord coord = new sCoord {
                    x = Convert.ToDouble(A_0.ReadLine(), CultureInfo.InvariantCulture),
                    y = Convert.ToDouble(A_0.ReadLine(), CultureInfo.InvariantCulture),
                    z = Convert.ToDouble(A_0.ReadLine(), CultureInfo.InvariantCulture)
                };
                A_0.ReadLine();
                switch (num4)
                {
                case 0:
                    ef = new d5(coord);
                    ef.e(A_0);
                    this.b.Add(ef);
                    break;

                case 1:
                    ef = new fv(coord);
                    ef.e(A_0);
                    this.b.Add(ef);
                    break;

                case 2:
                    ef = new fd(coord);
                    ef.e(A_0);
                    this.b.Add(ef);
                    break;

                case 3:
                    ef = new i(coord);
                    ef.e(A_0);
                    this.b.Add(ef);
                    break;

                case 4:
                    ef = new n(coord);
                    ef.e(A_0);
                    this.b.Add(ef);
                    break;

                case 5:
                    ef = new af(coord);
                    ef.e(A_0);
                    this.b.Add(ef);
                    break;

                case 6:
                    ef = new c2(coord);
                    ef.e(A_0);
                    this.b.Add(ef);
                    break;
                }
            }
        }
        return(true);
    }
 PressReleaseButton(fd, button, 1);
Esempio n. 5
0
 public MobCharacterDescriptor(fd instance) : base(instance)
 {
     _internal = instance;
 }
Esempio n. 6
0
 var(fd, err) = open(".", O_RDONLY);