IntX extension
Number (int & double) utility extensions.
- on
Properties
- days → Duration
-
Available on int, provided by the IntX extension
Duration in days.no setter - hours → Duration
-
Available on int, provided by the IntX extension
Duration in hours.no setter - isEven → bool
-
Available on int, provided by the IntX extension
Whether this integer is even.no setter - isOdd → bool
-
Available on int, provided by the IntX extension
Whether this integer is odd.no setter - minutes → Duration
-
Available on int, provided by the IntX extension
Duration in minutes.no setter - ms → Duration
-
Available on int, provided by the IntX extension
Duration in milliseconds.no setter - seconds → Duration
-
Available on int, provided by the IntX extension
Duration in seconds.no setter
Methods
-
between(
int min, int max) → bool -
Available on int, provided by the IntX extension
Whether this integer is inmin..max(inclusive). -
clampTo(
int min, int max) → int -
Available on int, provided by the IntX extension
Returns the value clamped betweenminandmax. -
generate<
T> (T generator(int index)) → List< T> -
Available on int, provided by the IntX extension
Returns a list generated bygeneratorwiththisitems. -
times(
void action(int index)) → void -
Available on int, provided by the IntX extension
Repeatsactionthis many times, passing the index (0-based).