Replies: 2 comments
-
I'm sorry I don't really understand your question. But you could do the following: chance.bool({likelihood: 99.999999998}) to get a true value from Chance 99.999999998% of the time So I think the answer to your question is yes, it is possible to return |
Beta Was this translation helpful? Give feedback.
-
Hi @Darren120, This will work, because it's within the 64 bits: chance.bool({likelihood: 99.999999998}) and technically this is not guaranteed to be accurate as that number would be truncated to chance.bool({likelihood: 99.99999999999999998}) // not guaranteed to be accurate https://en.wikipedia.org/wiki/Double-precision_floating-point_format#JavaScript I hope this resolves your question and you can mark it as answered. |
Beta Was this translation helpful? Give feedback.
-
title. or does it round it?
Beta Was this translation helpful? Give feedback.
All reactions