Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix interval random() behavior and add randomOrNull() #64

Merged
merged 4 commits into from
May 19, 2020

Conversation

erikc5000
Copy link
Owner

On the TimeInterval types, an unexpected exception can be generated when either the second or nanosecond of the Unix epoch is the same between the start and end. The logic has been updated to handle some of the corner cases better.

A randomOrNull() extension function has also been added to each range/interval, mirroring the Kotlin stdlib.

@erikc5000 erikc5000 merged commit afea820 into master May 19, 2020
@erikc5000 erikc5000 deleted the interval-random-fix branch May 19, 2020 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant