Hello Guest

Pseudo random number Algorithm

  • 2 Replies
  • 3357 Views
Pseudo random number Algorithm
« on: December 06, 2016, 00:02:38 »
Hello again everyone, i'm trying to make a pseudo random algorithm where you input a number(seed) and it will give u a bunch of x and y coordinated to make a good looking world. If anyone can help that would be great!

*

Offline abcdef

  • ****
  • 336
Re: Pseudo random number Algorithm
« Reply #1 on: December 06, 2016, 08:27:31 »
Just use a normal random number generator and run it twice and multiply the random numbers (assuming between 0 and 1) by the screen width and height.

*

Offline Cornix

  • *****
  • 488
Re: Pseudo random number Algorithm
« Reply #2 on: December 06, 2016, 09:20:58 »
The built in of the JDK is pretty good. Just look at that code if you really want to build your own.