DEV Community

loading...

Discussion on: 3 Amazing ways to generate random numbers without Math.random()

svijaykoushik profile image
Vijay Koushik, S. 👨🏽‍💻 Author

I think it is better to be explicit in this case.😎
Without knowing the target system, using multiplication is a risk.🙁

Thread Thread
wikunia profile image
Ole Kröger

I didn't want that it uses multiplication. I thought it would be nice to mention that the result (mathematically) is the same instead of: it's changing the result to make a completely new number. Make it clear to the reader what this does and how to visualize it. Then people who don't know it can use it if they want to multiply by a power of two somewhere.

Thread Thread
svijaykoushik profile image
Vijay Koushik, S. 👨🏽‍💻 Author

Oh... Okay 👍🏽. You're right. Why I didn't do is because,I thought it would be confusing to the readers.

Thread Thread
wikunia profile image
Ole Kröger

Fair enough. Maybe an extra box for extra information but understand your point.