Version: Unity 6.5 Alpha (6000.5)
LanguageEnglish
  • C#

math.ceil

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public static float ceil(float x);

Parameters

Parameter Description
x Input value.

Returns

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

Description

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


Declaration

public static float2 ceil(float2 x);

Parameters

Parameter Description
x Input value.

Returns

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

Description

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 float3 ceil(float3 x);

Parameters

Parameter Description
x Input value.

Returns

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

Description

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 float4 ceil(float4 x);

Parameters

Parameter Description
x Input value.

Returns

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

Description

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 double ceil(double x);

Parameters

Parameter Description
x Input value.

Returns

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

Description

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 double2 ceil(double2 x);

Parameters

Parameter Description
x Input value.

Returns

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

Description

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 double3 ceil(double3 x);

Parameters

Parameter Description
x Input value.

Returns

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

Description

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 double4 ceil(double4 x);

Parameters

Parameter Description
x Input value.

Returns

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

Description

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.