ceil

Summary

Rounds a number up.

Usage

public static double ceil(double x)

Returns

The result of rounding up the number.

Parameters

x

The number to round up.

Description

Rounds a number up. (Returns the ceiling of a number.)

Examples

Basic Usage
1
2
3
4
5
6
import System;
 
Console.log(Math.ceil(1));    // 1
Console.log(Math.ceil(2.5));  // 3
Console.log(Math.ceil(2.01)); // 3
Console.log(Math.ceil(2.9));  // 3

Share

HTML | BBCode | Direct Link