IntRange class final

Inclusive integer range.

Constructors

IntRange(int lo, int hi)
const
IntRange.single(int v)
A single value.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
hi → int
final
lo → int
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

clamp(int v) → int
contains(int v) → bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sample(Rng rng) → int
Uniform integer in [lo, hi].
sampleStep(Rng rng, int step) → int
Uniform value on a grid of step within [lo, hi] (e.g. whole-dp steps of 100 for dp × 100 values).
toString() → String
A string representation of this object.
inherited

Operators

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