Esempio n. 1
0
    public static Vector2?smethod_5(Vector2 vector2_0, Vector2 vector2_1, Vector2 vector2_2, Vector2 vector2_3)
    {
        float x   = vector2_0.X;
        float y   = vector2_0.Y;
        float x2  = vector2_1.X;
        float y2  = vector2_1.Y;
        float x3  = vector2_2.X;
        float y3  = vector2_2.Y;
        float x4  = vector2_3.X;
        float y4  = vector2_3.Y;
        float num = (x - x2) * (y3 - y4) - (y - y2) * (x3 - x4);

        if (num == 0f)
        {
            return(null);
        }
        float num2 = (x * y2 - y * x2) * (x3 - x4) - (x - x2) * (x3 * y4 - y3 * x4);
        float num3 = (x * y2 - y * x2) * (y3 - y4) - (y - y2) * (x3 * y4 - y3 * x4);
        float num4 = num2 / num;
        float num5 = num3 / num;

        if (GClass878.smethod_4(num4, vector2_0.X, vector2_1.X) && GClass878.smethod_4(num4, vector2_2.X, vector2_3.X) && GClass878.smethod_4(num5, vector2_0.Y, vector2_1.Y) && GClass878.smethod_4(num5, vector2_2.Y, vector2_3.Y))
        {
            return(new Vector2?(new Vector2(num4, num5)));
        }
        return(null);
    }
Esempio n. 2
0
    public static bool smethod_6(Vector2 vector2_0, Vector2 vector2_1, Vector2 vector2_2, Vector2 vector2_3, out Vector2 vector2_4)
    {
        Vector2?vector = GClass878.smethod_5(vector2_0, vector2_1, vector2_2, vector2_3);

        vector2_4 = vector.GetValueOrDefault();
        return(vector != null);
    }
Esempio n. 3
0
 public void Dispose()
 {
     for (int i = this.int_0; i > 0; i--)
     {
         GClass878.UnregisterHotKey(this.window_0.Handle, i);
     }
     this.window_0.Dispose();
 }
Esempio n. 4
0
 public void method_0(GEnum13 genum13_0, Keys keys_0)
 {
     this.int_0++;
     if (!GClass878.RegisterHotKey(this.window_0.Handle, this.int_0, (uint)genum13_0, (uint)keys_0))
     {
         throw new InvalidOperationException("Couldn’t register the hot key.");
     }
 }
Esempio n. 5
0
        private bool method_1(Vector2 vector2_0, int int_0, int int_1 = 30)
        {
            if (this.CurrentIndex == -1)
            {
                return(Vector2.Distance(vector2_0, this.Path.FirstOrDefault <Vector2>()) < (float)int_1);
            }
            int num = int_0 + 1;

            return(num < this.Path.Count && GClass878.smethod_13(this.Path[int_0], this.Path[num], vector2_0, true) < (double)int_1);
        }
Esempio n. 6
0
    public static float smethod_10(Vector2 vector2_0, Vector2 vector2_1, Vector2 vector2_2)
    {
        float num;
        float num2;
        float num3;

        if (!GClass878.smethod_9(vector2_0, vector2_1, out num, out num2, out num3))
        {
            return(0f);
        }
        return((float)((double)Math.Abs(vector2_2.X * num + vector2_2.Y * num2 + num3) / Math.Sqrt((double)(num * num + num2 * num2))));
    }
Esempio n. 7
0
 public static bool smethod_7(Rectangle rectangle_0, Vector2 vector2_0, Vector2 vector2_1, out Vector2 vector2_2)
 {
     vector2_2 = default(Vector2);
     if (!rectangle_0.Contains(new Point((int)vector2_0.X, (int)vector2_0.Y)) && !rectangle_0.Contains(new Point((int)vector2_1.X, (int)vector2_1.Y)))
     {
         Vector2 vector  = new Vector2((float)rectangle_0.Left, (float)rectangle_0.Top);
         Vector2 vector2 = new Vector2((float)rectangle_0.Right, (float)rectangle_0.Top);
         Vector2 vector3 = new Vector2((float)rectangle_0.Left, (float)rectangle_0.Bottom);
         Vector2 vector4 = new Vector2((float)rectangle_0.Right, (float)rectangle_0.Bottom);
         return(GClass878.smethod_6(vector, vector2, vector2_0, vector2_1, out vector2_2) || GClass878.smethod_6(vector2, vector4, vector2_0, vector2_1, out vector2_2) || GClass878.smethod_6(vector4, vector3, vector2_0, vector2_1, out vector2_2) || GClass878.smethod_6(vector3, vector, vector2_0, vector2_1, out vector2_2));
     }
     return(true);
 }
Esempio n. 8
0
 public bool method_3(Vector2 vector2_0, Vector2 vector2_1, out Vector2 vector2_2)
 {
     vector2_2 = default(Vector2);
     using (HashSet <ICollidable> .Enumerator enumerator = this.Collidables.GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             if (GClass878.smethod_7(enumerator.Current.imethod_1(), vector2_0, vector2_1, out vector2_2))
             {
                 return(true);
             }
         }
     }
     return(false);
 }
Esempio n. 9
0
    public static Vector2?smethod_8(Rectangle rectangle_0, Vector2 vector2_0, Vector2 vector2_1)
    {
        GClass878.< > c__DisplayClass8_0 CS$ < > 8__locals1;
        CS$ < > 8__locals1.vector2_0 = vector2_0;
        Vector2 vector  = new Vector2((float)rectangle_0.Left, (float)rectangle_0.Top);
        Vector2 vector2 = new Vector2((float)rectangle_0.Right, (float)rectangle_0.Top);
        Vector2 vector3 = new Vector2((float)rectangle_0.Left, (float)rectangle_0.Bottom);
        Vector2 vector4 = new Vector2((float)rectangle_0.Right, (float)rectangle_0.Bottom);

        CS$ < > 8__locals1.nullable_0 = null;
        GClass878.smethod_14(GClass878.smethod_5(vector, vector2, CS$ < > 8__locals1.vector2_0, vector2_1), ref CS$ < > 8__locals1);
        GClass878.smethod_14(GClass878.smethod_5(vector2, vector4, CS$ < > 8__locals1.vector2_0, vector2_1), ref CS$ < > 8__locals1);
        GClass878.smethod_14(GClass878.smethod_5(vector4, vector3, CS$ < > 8__locals1.vector2_0, vector2_1), ref CS$ < > 8__locals1);
        GClass878.smethod_14(GClass878.smethod_5(vector3, vector, CS$ < > 8__locals1.vector2_0, vector2_1), ref CS$ < > 8__locals1);
        return(CS$ < > 8__locals1.nullable_0);
    }
Esempio n. 10
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);
    }
Esempio n. 11
0
    public static double smethod_13(Vector2 vector2_0, Vector2 vector2_1, Vector2 vector2_2, bool bool_0)
    {
        if (bool_0)
        {
            if (GClass878.smethod_11(vector2_0, vector2_1, vector2_2) > 0.0)
            {
                return((double)Vector2.Distance(vector2_1, vector2_2));
            }
            if (GClass878.smethod_11(vector2_1, vector2_0, vector2_2) > 0.0)
            {
                return((double)Vector2.Distance(vector2_0, vector2_2));
            }
        }
        float num = Vector2.Distance(vector2_0, vector2_1);

        if (num == 0f)
        {
            return((double)Vector2.Distance(vector2_0, vector2_2));
        }
        return(Math.Abs(GClass878.smethod_12(vector2_0, vector2_1, vector2_2) / (double)num));
    }
Esempio n. 12
0
    public static PointF smethod_1(float float_0, float float_1, float float_2, PointF pointF_0, PointF pointF_1)
    {
        PointF pointF;
        PointF pointF2;
        int    num = GClass878.smethod_3(float_0, float_1, float_2, pointF_0, pointF_1, out pointF, out pointF2);

        if (num == 1)
        {
            return(pointF);
        }
        if (num != 2)
        {
            return(PointF.Empty);
        }
        double num2 = GClass878.smethod_2(pointF, pointF_0);
        double num3 = GClass878.smethod_2(pointF2, pointF_0);

        if (num2 < num3)
        {
            return(pointF);
        }
        return(pointF2);
    }