ceil

expect fun ceil(x: Double): Double(source)

Rounds the given value x to an integer towards positive infinity.

Since Kotlin

1.2

Return

the smallest double value that is greater than or equal to the given value x and is a mathematical integer.

Special cases:

  • ceil(x) is x where x is NaN or +Inf or -Inf or already a mathematical integer.


expect fun ceil(x: Float): Float(source)

Rounds the given value x to an integer towards positive infinity.

Since Kotlin

1.2

Return

the smallest Float value that is greater than or equal to the given value x and is a mathematical integer.

Special cases:

  • ceil(x) is x where x is NaN or +Inf or -Inf or already a mathematical integer.

actual inline fun ceil(x: Double): Double(source)

Rounds the given value x to an integer towards positive infinity.

Since Kotlin

1.2

Return

the smallest double value that is greater than or equal to the given value x and is a mathematical integer.

Special cases:

  • ceil(x) is x where x is NaN or +Inf or -Inf or already a mathematical integer.


actual inline fun ceil(x: Float): Float(source)

Rounds the given value x to an integer towards positive infinity.

Since Kotlin

1.2

Return

the smallest Float value that is greater than or equal to the given value x and is a mathematical integer.

Special cases:

  • ceil(x) is x where x is NaN or +Inf or -Inf or already a mathematical integer.

actual inline fun ceil(x: Double): Double(source)

Rounds the given value x to an integer towards positive infinity.

Since Kotlin

1.2

Return

the smallest double value that is greater than or equal to the given value x and is a mathematical integer.

Special cases:

  • ceil(x) is x where x is NaN or +Inf or -Inf or already a mathematical integer.


actual inline fun ceil(x: Float): Float(source)

Rounds the given value x to an integer towards positive infinity.

Since Kotlin

1.2

Return

the smallest Float value that is greater than or equal to the given value x and is a mathematical integer.

Special cases:

  • ceil(x) is x where x is NaN or +Inf or -Inf or already a mathematical integer.

actual external fun ceil(x: Double): Double(source)

Rounds the given value x to an integer towards positive infinity.

Since Kotlin

1.3

Return

the smallest double value that is greater than or equal to the given value x and is a mathematical integer.

Special cases:

  • ceil(x) is x where x is NaN or +Inf or -Inf or already a mathematical integer.


actual external fun ceil(x: Float): Float(source)

Rounds the given value x to an integer towards positive infinity.

Since Kotlin

1.3

Return

the smallest Float value that is greater than or equal to the given value x and is a mathematical integer.

Special cases:

  • ceil(x) is x where x is NaN or +Inf or -Inf or already a mathematical integer.

actual fun ceil(x: Double): Double(source)

Rounds the given value x to an integer towards positive infinity.

Since Kotlin

1.8

Return

the smallest double value that is greater than or equal to the given value x and is a mathematical integer.

Special cases:

  • ceil(x) is x where x is NaN or +Inf or -Inf or already a mathematical integer.


actual fun ceil(x: Float): Float(source)

Rounds the given value x to an integer towards positive infinity.

Since Kotlin

1.8

Return

the smallest Float value that is greater than or equal to the given value x and is a mathematical integer.

Special cases:

  • ceil(x) is x where x is NaN or +Inf or -Inf or already a mathematical integer.

actual fun ceil(x: Double): Double(source)

Rounds the given value x to an integer towards positive infinity.

Since Kotlin

1.8

Return

the smallest double value that is greater than or equal to the given value x and is a mathematical integer.

Special cases:

  • ceil(x) is x where x is NaN or +Inf or -Inf or already a mathematical integer.


actual fun ceil(x: Float): Float(source)

Rounds the given value x to an integer towards positive infinity.

Since Kotlin

1.8

Return

the smallest Float value that is greater than or equal to the given value x and is a mathematical integer.

Special cases:

  • ceil(x) is x where x is NaN or +Inf or -Inf or already a mathematical integer.