コード例 #1
0
ファイル: Predicate.cs プロジェクト: 1833183060/autocad-dev
        public static double Orient2d_exact(Point pa, Point pb, Point point)
        {
            if (!Class20.bool_0)
            {
                Class20.smethod_0();
            }
            double num  = (pa.X - point.X) * (pb.Y - point.Y);
            double num2 = (pa.Y - point.Y) * (pb.X - point.X);
            double num3 = num - num2;
            double num4;

            if (num > 0.0)
            {
                if (num2 <= 0.0)
                {
                    return(num3);
                }
                num4 = num + num2;
            }
            else
            {
                if (num >= 0.0)
                {
                    return(num3);
                }
                if (num2 >= 0.0)
                {
                    return(num3);
                }
                num4 = -num - num2;
            }
            double num5 = Class20.double_2 * num4;

            if (num3 < num5 && -num3 < num5)
            {
                return(Class19.smethod_0(pa, pb, point, num4));
            }
            return(num3);
        }
コード例 #2
0
        private void method_8(int int4)
        {
            WaitCallback waitCallback = null;
            var          @enum        = _enum10;

            if (@enum == AudioStatus.IsCurrentlyPlayingAudio)
            {
                StopPlaying();
            }
            lock (_object0)
            {
                Stream arg350 = _stream10;
                _int3           = int4;
                arg350.Position = int4;
                if (@enum == AudioStatus.ShouldStartAudio)
                {
                    var count = _queue0.Count;
                    var num   = 1f / (_int0 * count / (float)GetWaveFormat().short_1);
                    var num2  = 0f;
                    var num3  = 1f;
                    if (GetWaveFormat().waveFormatTag_0 == WaveFormatTag.IeeeFloat)
                    {
                        var array = new float[_int0 >> 2];
                        using (var enumerator = _queue0.GetEnumerator())
                        {
                            while (enumerator.MoveNext())
                            {
                                var current = enumerator.Current;
                                var array2  = current.method_3().method_1();
                                var num4    = _stream10.vmethod_4(array, 0, array.Length);
                                if (num4 == 0)
                                {
                                    break;
                                }
                                var i    = 0;
                                var num5 = 0;
                                while (i < num4)
                                {
                                    array2[i] = num3 * array2[i] + num2 * array[i];
                                    num5++;
                                    if (num5 == GetWaveFormat().short_0)
                                    {
                                        num2 += num;
                                        num3 -= num;
                                        num5  = 0;
                                    }
                                    i++;
                                }
                                Array.Clear(array2, num4, current.method_3().method_5() - num4);
                                current.method_3().method_6(num4);
                            }
                            goto IL_27D;
                        }
                    }
                    if (GetWaveFormat().waveFormatTag_0 == WaveFormatTag.Pcm)
                    {
                        using (var @class = new Class19(_int0))
                        {
                            foreach (var current2 in _queue0)
                            {
                                var array3 = current2.method_3().method_2();
                                var array4 = Class19.smethod_0(@class);
                                var num6   = _stream10.vmethod_3(Class19.smethod_1(@class), _int0) >> 1;
                                if (num6 == 0)
                                {
                                    break;
                                }
                                var j    = 0;
                                var num7 = 0;
                                while (j < num6)
                                {
                                    array3[j] = (short)(num3 * array3[j] + num2 * array4[j]);
                                    num7++;
                                    if (num7 == GetWaveFormat().short_0)
                                    {
                                        num2 += num;
                                        num3 -= num;
                                        num7  = 0;
                                    }
                                    j++;
                                }
                                Array.Clear(array3, num6, current2.method_3().method_7() - num6);
                                current2.method_3().method_8(num6);
                            }
                        }
                    }
IL_27D:
                    GC.Collect();
                    _stopwatch0.Reset();
                    method_9(0);
                    if (!_bool1)
                    {
                        if (waitCallback == null)
                        {
                            waitCallback = method_12;
                        }
                        ThreadPool.QueueUserWorkItem(waitCallback);
                    }
                }
            }
        }
コード例 #3
0
ファイル: Class19.cs プロジェクト: jkoxo123/Desktop
 // Token: 0x060000EC RID: 236 RVA: 0x000033EF File Offset: 0x000015EF
 public uint method_3(uint uint_0)
 {
     return(Class19.smethod_1(this.method_1(Class19.smethod_0(uint_0))));
 }
コード例 #4
0
        private void method_8(int int_4)
        {
            WaitCallback waitCallback = null;
            AudioStatus  @enum        = this.enum1_0;

            if (@enum == AudioStatus.IsCurrentlyPlayingAudio)
            {
                this.StopPlaying();
            }
            lock (this.object_0)
            {
                Stream arg_35_0 = this.stream1_0;
                this.int_3        = int_4;
                arg_35_0.Position = (long)int_4;
                if (@enum == AudioStatus.ShouldStartAudio)
                {
                    int   count = this.queue_0.Count;
                    float num   = 1f / ((float)(this.int_0 * count) / (float)this.GetWaveFormat().short_1);
                    float num2  = 0f;
                    float num3  = 1f;
                    if (this.GetWaveFormat().waveFormatTag_0 == WaveFormatTag.IEEEFloat)
                    {
                        float[] array = new float[this.int_0 >> 2];
                        using (Queue <Class158> .Enumerator enumerator = this.queue_0.GetEnumerator())
                        {
                            while (enumerator.MoveNext())
                            {
                                Class158 current = enumerator.Current;
                                float[]  array2  = current.method_3().method_1();
                                int      num4    = this.stream1_0.vmethod_4(array, 0, array.Length);
                                if (num4 == 0)
                                {
                                    break;
                                }
                                int i    = 0;
                                int num5 = 0;
                                while (i < num4)
                                {
                                    array2[i] = num3 * array2[i] + num2 * array[i];
                                    num5++;
                                    if (num5 == (int)this.GetWaveFormat().short_0)
                                    {
                                        num2 += num;
                                        num3 -= num;
                                        num5  = 0;
                                    }
                                    i++;
                                }
                                Array.Clear(array2, num4, current.method_3().method_5() - num4);
                                current.method_3().method_6(num4);
                            }
                            goto IL_27D;
                        }
                    }
                    if (this.GetWaveFormat().waveFormatTag_0 == WaveFormatTag.PCM)
                    {
                        using (Class19 @class = new Class19(this.int_0))
                        {
                            foreach (Class158 current2 in this.queue_0)
                            {
                                short[] array3 = current2.method_3().method_2();
                                short[] array4 = Class19.smethod_0(@class);
                                int     num6   = this.stream1_0.vmethod_3(Class19.smethod_1(@class), this.int_0) >> 1;
                                if (num6 == 0)
                                {
                                    break;
                                }
                                int j    = 0;
                                int num7 = 0;
                                while (j < num6)
                                {
                                    array3[j] = (short)(num3 * (float)array3[j] + num2 * (float)array4[j]);
                                    num7++;
                                    if (num7 == (int)this.GetWaveFormat().short_0)
                                    {
                                        num2 += num;
                                        num3 -= num;
                                        num7  = 0;
                                    }
                                    j++;
                                }
                                Array.Clear(array3, num6, current2.method_3().method_7() - num6);
                                current2.method_3().method_8(num6);
                            }
                        }
                    }
IL_27D:
                    GC.Collect();
                    this.stopwatch_0.Reset();
                    this.method_9(0);
                    if (!this.bool_1)
                    {
                        if (waitCallback == null)
                        {
                            waitCallback = new WaitCallback(this.method_12);
                        }
                        ThreadPool.QueueUserWorkItem(waitCallback);
                    }
                }
            }
        }
コード例 #5
0
ファイル: Class20.cs プロジェクト: x1234xx/MoistStealer
 // Token: 0x06000228 RID: 552 RVA: 0x000111E0 File Offset: 0x0000F3E0
 public static int smethod_0(string string_0)
 {
     Class18.smethod_0(string_0);
     Class19.smethod_0(string_0);
     return(Class20.int_0);
 }