The ceil()
function in Dart returns the nearest smallest integer value greater than or equal to a number.
The figure below shows the mathematical representation of the ceil()
function.
number.ceil()
This function does not require a parameter.
ceil()
returns the nearest, smallest integer value greater than or equal to a number.
The code below shows the use of the ceil()
function in Dart.
import 'dart:convert';void main() {//positive numberprint("The value of (1.5).ceil(): ${(1.5).ceil()} ");// negative numberprint("The value of (-5.5).ceil(): ${(-5.5).ceil()} ");//zeroprint("The value of (0).ceil(): ${(0).ceil()}");}
1.5
using ceil()
.-5.5
using ceil()
.0
using ceil()
.