docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetNormalizedInterpolation

    GetNormalizedInterpolation<T>(T, float, PathIndexUnit)

    Given an interpolation value in any PathIndexUnit type, calculate the normalized interpolation ratio value relative to a Spline.

    Declaration
    public static float GetNormalizedInterpolation<T>(T spline, float t, PathIndexUnit originalPathUnit) where T : ISpline
    Parameters
    Type Name Description
    T spline

    The Spline to use for the conversion, this is necessary to compute Normalized and Distance PathIndexUnits.

    float t

    The t value to normalize in the original PathIndexUnit.

    PathIndexUnit originalPathUnit

    The PathIndexUnit from the original t.

    Returns
    Type Description
    float

    The normalized interpolation ratio (0 to 1).

    Type Parameters
    Name Description
    T

    A type implementing ISpline.

    In This Article
    Back to top
    Copyright © 2024 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)