floorToMultipleOf method
Rounds a non-negative integer down to nearest multiple of multipleOf
that is less-than-or-equal-to this integer.
multipleOf
must be positive.
Implementation
int floorToMultipleOf(int multipleOf) {
assert(this >= 0);
assert(multipleOf > 0);
return (this ~/ multipleOf) * multipleOf;
}