docs.unity3d.com
    Show / Hide Table of Contents

    Struct NativeSortExtension.DefaultComparer<T>

    A comparer that uses IComparable.CompareTo(). For primitive types, this is an ascending sort.

    Namespace: Unity.Collections
    Syntax
    public struct DefaultComparer<T> : IComparer<T> where T : IComparable<T>
    Type Parameters
    Name Description
    T

    Source type of elements

    Methods

    Compare(T, T)

    Compares two values.

    Declaration
    public int Compare(T x, T y)
    Parameters
    Type Name Description
    T x

    First value to compare.

    T y

    Second value to compare.

    Returns
    Type Description
    Int32

    A signed integer that indicates the relative values of x and y (=0: x == y, <0: x < y, >0: x > y).

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023