Skip to content

Fix: NextFloat/Double could return a value equal to max due to floating point error#10

Merged
nuskey8 merged 1 commit into
mainfrom
fix-nextfloat-range
Aug 20, 2024
Merged

Fix: NextFloat/Double could return a value equal to max due to floating point error#10
nuskey8 merged 1 commit into
mainfrom
fix-nextfloat-range

Conversation

@nuskey8

@nuskey8 nuskey8 commented Aug 20, 2024

Copy link
Copy Markdown
Owner

Added checks to prevent NextFloat() and NextDouble() from returning a value equal to max due to floating point errors. A similar implementation exists in java.utils.Random.

@nuskey8 nuskey8 merged commit 02f190e into main Aug 20, 2024
@nuskey8 nuskey8 deleted the fix-nextfloat-range branch August 20, 2024 03:19
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.

1 participant