IntRange class final
Inclusive integer range.
Constructors
- IntRange(int lo, int hi)
-
const
- IntRange.single(int v)
-
A single value.
const
Properties
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
stepwithin[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