fromPosition method
The instant at a position (slots from the start), clamped.
Implementation
Instant fromPosition(double x) {
final p = x.isNaN ? 0.0 : x.clamp(0.0, length);
return Instant.fromEpochMilliseconds(jsRound(start.epochMilliseconds + p * _unitMs));
}