docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method MergeSort

    MergeSort(uint[], int, ref uint[])

    Merge sort - non recursive

    Declaration
    public static void MergeSort(uint[] arr, int sortSize, ref uint[] supportArray)
    Parameters
    Type Name Description
    uint[] arr

    Array to sort.

    int sortSize

    Size of the array to sort. If greater than array capacity, it will get clamped.

    uint[] supportArray

    Secondary array reference, used to store intermediate merge results.

    MergeSort(NativeArray<uint>, int, ref NativeArray<uint>)

    Merge sort - non recursive

    Declaration
    public static void MergeSort(NativeArray<uint> arr, int sortSize, ref NativeArray<uint> supportArray)
    Parameters
    Type Name Description
    NativeArray<uint> arr

    Array to sort.

    int sortSize

    Size of the array to sort. If greater than array capacity, it will get clamped.

    NativeArray<uint> supportArray

    Secondary array reference, used to store intermediate merge results.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)