JasonBock / SpackleNet

Spackle is a project that contains a number of helper methods I've used to supplement the core classes in .NET.
MIT License
14 stars 1 forks source link

Add Next(BigInteger) #22

Closed JasonBock closed 4 years ago

JasonBock commented 4 years ago

Right now, GetBigInteger() takes a number that specifies a number of digits that the resultant number should have. I'm thinking of adding Next(BigInteger) that would use GetBigInteger() to create a number, and then use the mod of that number if it's greater than the given max number.

JasonBock commented 4 years ago

FYI if I need to figure out how many digits a given BigInteger has:

https://stackoverflow.com/questions/34052376/can-i-find-the-number-of-digits-of-a-biginteger-in-c