Method Sort
Sort<T>(T*, int)
Sorts an array in ascending order.
Declaration
public static void Sort<T>(T* array, int length) where T : unmanaged, IComparable<T>
Parameters
Type | Name | Description |
---|---|---|
T* | array | The array to sort. |
int | length | The number of elements to sort in the array.
Indexes greater than or equal to |
Type Parameters
Name | Description |
---|---|
T | The type of the elements. |
Sort<T, U>(T*, int, U)
Sorts an array using a custom comparison.
Declaration
public static void Sort<T, U>(T* array, int length, U comp) where T : unmanaged where U : IComparer<T>
Parameters
Type | Name | Description |
---|---|---|
T* | array | The array to sort. |
int | length | The number of elements to sort in the array.
Indexes greater than or equal to |
U | comp | The comparison function used to determine the relative order of the elements. |
Type Parameters
Name | Description |
---|---|
T | The type of the elements. |
U | The type of the comparer. |
Sort<T>(NativeArray<T>)
Sorts this array in ascending order.
Declaration
public static void Sort<T>(this NativeArray<T> array) where T : unmanaged, IComparable<T>
Parameters
Type | Name | Description |
---|---|---|
NativeArray<T> | array | The array to sort. |
Type Parameters
Name | Description |
---|---|
T | The type of the elements. |
Sort<T, U>(NativeArray<T>, U)
Sorts this array using a custom comparison.
Declaration
public static void Sort<T, U>(this NativeArray<T> array, U comp) where T : unmanaged where U : IComparer<T>
Parameters
Type | Name | Description |
---|---|---|
NativeArray<T> | array | The array to sort. |
U | comp | The comparison function used to determine the relative order of the elements. |
Type Parameters
Name | Description |
---|---|
T | The type of the elements. |
U | The type of the comparer. |
Sort<T>(NativeList<T>)
Sorts this list in ascending order.
Declaration
public static void Sort<T>(this NativeList<T> list) where T : unmanaged, IComparable<T>
Parameters
Type | Name | Description |
---|---|---|
NativeList<T> | list | The list to sort. |
Type Parameters
Name | Description |
---|---|
T | The type of the elements. |
Sort<T, U>(NativeList<T>, U)
Sorts this list using a custom comparison.
Declaration
public static void Sort<T, U>(this NativeList<T> list, U comp) where T : unmanaged where U : IComparer<T>
Parameters
Type | Name | Description |
---|---|---|
NativeList<T> | list | The list to sort. |
U | comp | The comparison function used to determine the relative order of the elements. |
Type Parameters
Name | Description |
---|---|
T | The type of the elements. |
U | The type of the comparer. |
Sort<T>(UnsafeList<T>)
Sorts this list in ascending order.
Declaration
public static void Sort<T>(this UnsafeList<T> list) where T : unmanaged, IComparable<T>
Parameters
Type | Name | Description |
---|---|---|
UnsafeList<T> | list | The list to sort. |
Type Parameters
Name | Description |
---|---|
T | The type of the elements. |
Sort<T, U>(UnsafeList<T>, U)
Sorts the list using a custom comparison.
Declaration
public static void Sort<T, U>(this UnsafeList<T> list, U comp) where T : unmanaged where U : IComparer<T>
Parameters
Type | Name | Description |
---|---|---|
UnsafeList<T> | list | The list to sort. |
U | comp | The comparison function used to determine the relative order of the elements. |
Type Parameters
Name | Description |
---|---|
T | The type of the elements. |
U | The type of the comparer. |
Sort<T>(NativeSlice<T>)
Sorts this slice in ascending order.
Declaration
public static void Sort<T>(this NativeSlice<T> slice) where T : unmanaged, IComparable<T>
Parameters
Type | Name | Description |
---|---|---|
NativeSlice<T> | slice | The slice to sort. |
Type Parameters
Name | Description |
---|---|
T | The type of the elements. |
Sort<T, U>(NativeSlice<T>, U)
Sorts this slice using a custom comparison.
Declaration
public static void Sort<T, U>(this NativeSlice<T> slice, U comp) where T : unmanaged where U : IComparer<T>
Parameters
Type | Name | Description |
---|---|---|
NativeSlice<T> | slice | The slice to sort. |
U | comp | The comparison function used to determine the relative order of the elements. |
Type Parameters
Name | Description |
---|---|
T | The type of the elements. |
U | The type of the comparer. |