NumberRoundType enum

The round type of number parsing.

Inheritance
Available extensions

Values

round → const NumberRoundType

Round the number to the nearest integer.

Such as of integers:

  • 1.5 -> 2
  • 1.4 -> 1
  • 1.455 -> 1
  • -1.5 -> -1
  • -1.4 -> -2

Such as of floats 2 digits:

  • 1.334 -> 1.33
  • 1.335 -> 1.34
  • -1.334 -> -1.33
  • -1.335 -> -1.33
  • -1.336 -> -1.34
floor → const NumberRoundType

Round the number to the nearest integer(lower). Such as of integers:

  • 1.5 -> 1
  • 1.4 -> 1
  • 1.9 -> 1
  • -1.5 -> -2

Such as of floats 2 digits:

  • 1.334 -> 1.33
  • 1.335 -> 1.33
  • -1.555 -> -1.56
ceil → const NumberRoundType

Round the number to the nearest number(bigger).

Such as of integers:

  • 1.5 -> 2
  • 1.4 -> 2
  • 1.1 -> 2
  • -1.5 -> -1

Such as of floats 2 digits:

  • 1.334 -> 1.34
  • 1.335 -> 1.34
  • -1.555 -> -1.55

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<NumberRoundType>
A constant List of the values in this enum, in order of their declaration.