docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method ceil

    ceil(float)

    Returns the result of rounding a float value up to the nearest integral value greater or equal to the original value.

    Declaration
    public static float ceil(float x)
    Parameters
    Type Name Description
    float x

    Input value.

    Returns
    Type Description
    float

    The round up to nearest integral value of the input.

    ceil(float2)

    Returns the result of rounding each component of a float2 vector value up to the nearest value greater or equal to the original value.

    Declaration
    public static float2 ceil(float2 x)
    Parameters
    Type Name Description
    float2 x

    Input value.

    Returns
    Type Description
    float2

    The componentwise round up to nearest integral value of the input.

    ceil(float3)

    Returns the result of rounding each component of a float3 vector value up to the nearest value greater or equal to the original value.

    Declaration
    public static float3 ceil(float3 x)
    Parameters
    Type Name Description
    float3 x

    Input value.

    Returns
    Type Description
    float3

    The componentwise round up to nearest integral value of the input.

    ceil(float4)

    Returns the result of rounding each component of a float4 vector value up to the nearest value greater or equal to the original value.

    Declaration
    public static float4 ceil(float4 x)
    Parameters
    Type Name Description
    float4 x

    Input value.

    Returns
    Type Description
    float4

    The componentwise round up to nearest integral value of the input.

    ceil(double)

    Returns the result of rounding a double value up to the nearest greater integral value greater or equal to the original value.

    Declaration
    public static double ceil(double x)
    Parameters
    Type Name Description
    double x

    Input value.

    Returns
    Type Description
    double

    The round up to nearest integral value of the input.

    ceil(double2)

    Returns the result of rounding each component of a double2 vector value up to the nearest integral value greater or equal to the original value.

    Declaration
    public static double2 ceil(double2 x)
    Parameters
    Type Name Description
    double2 x

    Input value.

    Returns
    Type Description
    double2

    The componentwise round up to nearest integral value of the input.

    ceil(double3)

    Returns the result of rounding each component of a double3 vector value up to the nearest integral value greater or equal to the original value..

    Declaration
    public static double3 ceil(double3 x)
    Parameters
    Type Name Description
    double3 x

    Input value.

    Returns
    Type Description
    double3

    The componentwise round up to nearest integral value of the input.

    ceil(double4)

    Returns the result of rounding each component of a double4 vector value up to the nearest integral value greater or equal to the original value.

    Declaration
    public static double4 ceil(double4 x)
    Parameters
    Type Name Description
    double4 x

    Input value.

    Returns
    Type Description
    double4

    The componentwise round up to nearest integral value of the input.

    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)