Dart Programming – floor Method

  • Post author:
  • Post category:Dart
  • Post comments:2 Comments
dart programming floor method

In this guide, we will discuss floor Method in Dart Programming Language. This method returns the largest integer less than or equal to a number.

Syntax

Number.floor()

Return Value

Returns the largest integer less than or equal to a number x.

Example

void main() { 
   var a = 2.9; 
   print("The floor value of 2.9 = ${a.floor()}"); 
} 

It will produce the following output −.

The floor value of 2.9 = 2

Next Topic : Click Here

This Post Has 2 Comments

Leave a Reply