docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method AbsDistance

    AbsDistance(ushort, ushort)

    Calculate the difference between two sequence IDs, taking integer overflow/underflow into account. For example, both AbsDistance(65535, 0) and AbsDistance(0, 65535) will return 1, not 65535.

    Declaration
    public static int AbsDistance(ushort lhs, ushort rhs)
    Parameters
    Type Name Description
    ushort lhs

    The first sequence ID. Compared against the second.

    ushort rhs

    The second sequence ID. Compared against the first.

    Returns
    Type Description
    int

    An integer value equal to the distance between the sequence IDs.

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