nickgammon / BigNumber

BigNumber library for the Arduino
MIT License
85 stars 22 forks source link

Random number in BigNumber #14

Open kaztirtandy opened 5 years ago

kaztirtandy commented 5 years ago

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!!

nickgammon commented 5 years ago

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