Integers extension

Provides functions for working with ints.

See Numbers in Dart for behaviour discrepancies between native and web.

on

Methods

ceilTo(int factor) int

Available on int, provided by the Integers extension

Ceils this to the closest multiple of factor.
floorTo(int factor) int

Available on int, provided by the Integers extension

Floors this to the closest multiple of factor.
roundTo(int factor) int

Available on int, provided by the Integers extension

Rounds this to the closest multiple of factor.
toBool() bool

Available on int, provided by the Integers extension

If 0, returns false, otherwise returns true.

Static Properties

range Interval<int>

Available on int, provided by the Integers extension

The range of int on the current platform.
no setter