Algorithm-Arena / weekly-challenge-23-unconventional-randomness

0 stars 0 forks source link

Submission - International Space Station #5

Open philip-edekobi opened 2 weeks ago

philip-edekobi commented 2 weeks ago

This one is kinda all over the place. It works by performing some arithmetic as follows:

numerator = (Mouse x Mouse coordinates) Absolute Value(lat * long( of the ISS)) denominator = last 6 digits of current utc timestamp

the resulting fraction is called seed(numerator / denominator)

rand = Math.floor(seed 1000 Math.random())

this gives a random number between 0 and 100 that changes every 3 seconds

Code: https://github.com/philip-edekobi/rand-gen Demo: https://random-method.netlify.app/

Video Example

Screencast from 24-06-2024 08:40:21.webm