public static IndexOfMaxComponent2Job Init() { var length = 4; var job = new IndexOfMaxComponent2Job { 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); }
public void TestIndexOfMaxComponent() { var indexOfMaxComponent2Job = IndexOfMaxComponent2Job.Init(); indexOfMaxComponent2Job.Run(); indexOfMaxComponent2Job.Dispose(); var indexOfMaxComponent3Job = IndexOfMaxComponent3Job.Init(); indexOfMaxComponent3Job.Run(); indexOfMaxComponent3Job.Dispose(); var indexOfMaxComponent4Job = IndexOfMaxComponent4Job.Init(); indexOfMaxComponent4Job.Run(); indexOfMaxComponent4Job.Dispose(); }