Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


ceil

Returns the result of rounding a float value up to the nearest integral value greater or equal to the original value.
Read time 2 minutesLast updated 10 days ago

Definition

ceil(float)

Returns the result of rounding a float value up to the nearest integral value greater or equal to the original value.
public static float ceil(float x)

Parameters

Input value.

Returns

Type

Description

floatThe 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.
public static float2 ceil(float2 x)

Parameters

Input value.

Returns

Type

Description

float2The 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.
public static float3 ceil(float3 x)

Parameters

Input value.

Returns

Type

Description

float3The 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.
public static float4 ceil(float4 x)

Parameters

Input value.

Returns

Type

Description

float4The 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.
public static double ceil(double x)

Parameters

Input value.

Returns

Type

Description

doubleThe 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.
public static double2 ceil(double2 x)

Parameters

Input value.

Returns

Type

Description

double2The 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..
public static double3 ceil(double3 x)

Parameters

Input value.

Returns

Type

Description

double3The 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.
public static double4 ceil(double4 x)

Parameters

Input value.

Returns

Type

Description

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