Exemple #1
0
    public static double smethod_3(float float_0, float float_1, float float_2, float float_3, bool bool_0 = false)
    {
        double num  = Math.Atan2((double)float_1, (double)float_0);
        double num2 = Math.Atan2((double)float_3, (double)float_2);
        int    num3 = GClass873.smethod_1(float_0, float_1);
        int    num4 = GClass873.smethod_1(float_2, float_3);
        double num5 = num2;

        if (num3 == num4)
        {
            num5 = Math.Max(num, num2);
        }
        else if (num3 == (num4 + 1) % 4)
        {
            num5 = num;
        }
        if (!bool_0)
        {
            return(num5);
        }
        if (num5 != num)
        {
            return(num);
        }
        return(num2);
    }
Exemple #2
0
    protected virtual bool vmethod_50(Ship ship_0, Ship ship_1)
    {
        int    num  = this.vmethod_49();
        bool   flag = ship_1 != null && this.vmethod_11(ship_0 as NpcShip) && !this.vmethod_11(ship_1 as NpcShip);
        double num2 = (this.method_29() || flag) ? 0.0 : Math.Abs(GClass873.smethod_4(ship_0.Position - base.Context.HeroPosition, ship_1.Position - base.Context.HeroPosition));

        return((flag || Vector2.Distance(ship_1.Position, ship_0.Position) > (float)num) && num2 < 1.0);
    }
Exemple #3
0
    private void method_2()
    {
        WindowInteropHelper windowInteropHelper = new WindowInteropHelper(this);

        foreach (int int_ in this.hashSet_0)
        {
            GClass873.UnregisterHotKey(windowInteropHelper.Handle, int_);
        }
        this.hashSet_0.Clear();
    }
Exemple #4
0
    private void method_1(GEnum13 genum13_0, Keys keys_0)
    {
        WindowInteropHelper windowInteropHelper = new WindowInteropHelper(this);
        int num = Interlocked.Increment(ref GClass873.int_0);

        if (GClass873.RegisterHotKey(windowInteropHelper.Handle, num, (uint)genum13_0, (uint)keys_0))
        {
            this.hashSet_0.Add(num);
        }
    }
Exemple #5
0
    public static float smethod_7(float float_0, float float_1, float float_2, float float_3, float float_4)
    {
        float  num  = (float)Math.Atan2((double)float_1, (double)float_0);
        double num2 = GClass873.smethod_5(float_0, float_1, float_2, float_3);

        if (float_4 < 0f)
        {
            float_4 = -float_4;
            num2    = 6.2831853071795862 - num2;
        }
        if (Math.Abs(num2) > (double)float_4)
        {
            num2 = (double)(float_4 * (float)Math.Sign(num2));
        }
        return((float)((double)num + num2));
    }
Exemple #6
0
    public static bool smethod_2(float float_0, float float_1, float float_2, float float_3)
    {
        double num  = Math.Atan2((double)float_1, (double)float_0);
        double num2 = Math.Atan2((double)float_3, (double)float_2);
        int    num3 = GClass873.smethod_1(float_0, float_1);
        int    num4 = GClass873.smethod_1(float_2, float_3);
        double num5 = num2;

        if (num3 == num4)
        {
            num5 = Math.Max(num, num2);
        }
        else if (num3 == (num4 + 1) % 4)
        {
            num5 = num;
        }
        return(num5 == num2);
    }
Exemple #7
0
    public static Vector2 smethod_0(Vector2 vector2_0, Vector2 vector2_1, float float_0, Vector2?nullable_0 = null, float float_1 = 0.5f)
    {
        Vector2 vector = default(Vector2);

        if (nullable_0 != null)
        {
            Vector2 value = nullable_0.Value;
            PointF  left  = GClass878.smethod_1(vector2_1.X, vector2_1.Y, float_0, new PointF(value.X, value.Y), new PointF(vector2_1.X, vector2_1.Y));
            if (left != PointF.Empty)
            {
                vector = new Vector2(left.X, left.Y);
            }
        }
        if (vector == default(Vector2))
        {
            double num = Math.Atan2((double)(vector2_0.X - vector2_1.X), (double)(vector2_0.Y - vector2_1.Y)) + (double)float_1;
            vector = GClass873.smethod_8(vector2_1, float_0, (float)num);
        }
        return(vector);
    }
Exemple #8
0
    protected override IEnumerable <Vector2> vmethod_22()
    {
        IEnumerator <Vector2> enumerator = this.method_30().GetEnumerator();

        for (;;)
        {
            try
            {
IL_52:
                if (!enumerator.MoveNext())
                {
                    break;
                }
                goto IL_94;
IL_4A:
                goto IL_52;
            }
            finally
            {
                if (enumerator != null)
                {
                    enumerator.Dispose();
                }
            }
            break;
            IL_94:
            Vector2 vector = enumerator.Current;
            yield return(vector);

            goto IL_4A;
        }
        enumerator = null;
        yield return(GClass873.smethod_8(this.method_26(), this.float_1, this.float_0));

        yield break;
        yield break;
    }
Exemple #9
0
 public static double smethod_5(float float_0, float float_1, float float_2, float float_3)
 {
     return(Math.Atan2(GClass873.Cross(float_0, float_1, float_2, float_3), GClass873.smethod_6(float_0, float_1, float_2, float_3)));
 }
Exemple #10
0
 public static double smethod_4(Vector2 vector2_0, Vector2 vector2_1)
 {
     return(GClass873.smethod_5(vector2_0.X, vector2_0.Y, vector2_1.X, vector2_1.Y));
 }