Exemplo n.º 1
0
            public static IndexOfMinComponent2Job Init()
            {
                var length = 4;
                var job    = new IndexOfMinComponent2Job
                {
                    In  = new NativeArray <float2>(length, Allocator.TempJob),
                    Out = new NativeArray <int>(length, Allocator.TempJob)
                };

                job.In[0] = new float2(-1, 1);
                job.In[1] = new float2(1, -1);
                job.In[2] = new float2(float.NaN, 1);
                job.In[3] = new float2(float.PositiveInfinity, float.NegativeInfinity);

                return(job);
            }
Exemplo n.º 2
0
        public void TestIndexOfMinComponent()
        {
            var indexOfMinComponent2Job = IndexOfMinComponent2Job.Init();

            indexOfMinComponent2Job.Run();
            indexOfMinComponent2Job.Dispose();

            var indexOfMinComponent3Job = IndexOfMinComponent3Job.Init();

            indexOfMinComponent3Job.Run();
            indexOfMinComponent3Job.Dispose();

            var indexOfMinComponent4Job = IndexOfMinComponent4Job.Init();

            indexOfMinComponent4Job.Run();
            indexOfMinComponent4Job.Dispose();
        }