docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Operator explicit operator

    explicit operator half(float)

    Explicitly converts a float value to a half value.

    Declaration
    public static explicit operator half(float v)
    Parameters
    Type Name Description
    float v

    The single precision float value to convert to half.

    Returns
    Type Description
    half

    The converted half value.

    explicit operator half(double)

    Explicitly converts a double value to a half value.

    Declaration
    public static explicit operator half(double v)
    Parameters
    Type Name Description
    double v

    The double precision float value to convert to half.

    Returns
    Type Description
    half

    The converted half value.

    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)