BigNumber icon indicating copy to clipboard operation
BigNumber copied to clipboard

Random number in BigNumber

Open kaztirtandy opened this issue 5 years ago • 1 comments

hello nick thank you for your awesome libraries!! i wanna ask some if this library can generate random number in BigNumber? or i think if there is a way to convert random number in int or long to type data BigNumber? Thank you so much!!

kaztirtandy avatar May 29 '19 06:05 kaztirtandy

I think generating random numbers is a bit out of scope of this library. However it is easy enough to turn a random number (ie. int) into a BigNumber. eg. if "r" is an "int" random number generated elsewhere:

BigNumber bigRandom (r);  // make a random number

nickgammon avatar Jun 03 '19 00:06 nickgammon