docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Operator explicit operator

    explicit operator half4(float)

    Explicitly converts a single float value to a half4 vector by converting it to half and assigning it to every component.

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

    float to convert to half4

    Returns
    Type Description
    half4

    Converted value.

    explicit operator half4(float4)

    Explicitly converts a float4 vector to a half4 vector by componentwise conversion.

    Declaration
    public static explicit operator half4(float4 v)
    Parameters
    Type Name Description
    float4 v

    float4 to convert to half4

    Returns
    Type Description
    half4

    Converted value.

    explicit operator half4(double)

    Explicitly converts a single double value to a half4 vector by converting it to half and assigning it to every component.

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

    double to convert to half4

    Returns
    Type Description
    half4

    Converted value.

    explicit operator half4(double4)

    Explicitly converts a double4 vector to a half4 vector by componentwise conversion.

    Declaration
    public static explicit operator half4(double4 v)
    Parameters
    Type Name Description
    double4 v

    double4 to convert to half4

    Returns
    Type Description
    half4

    Converted 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)