Skip to content
drewmccluskey edited this page Jan 9, 2019 · 3 revisions

ceil

This function will everytime round up.

Syntax:

ceil(val)
Argument Description
double val The value to round up

Returns: int

Description:

This function will round the input double up, it is similar to round(); but will instead always round up.

Example:

double numberToRoundUp = 5.1111;
var RoundedNumberUp = ceil(numberToRoundUp); //return 6

This code will round up and assign double numberToRoundUp with value 5.1111 to var RoundedNumberUp with a resulting value of 6.

Back to number_functions

Clone this wiki locally