lune-org/lune

add the `Random` library of ROBLOX.

Opened this issue · 5 comments

jLn0n commented

I don't wanna taint the math.random, and I want to have a psuedorandom thing for my code.

I want to do this as a fun little Rust project.

Random is an extension of math.random, they both internally use the same algorithm. The issue is establishing what the "internal entropy" is if you dont define a seed.

I'm going to use an unsigned float of the current CPU clock time as the internal seed. Probably isn't at parity but the number isn't meant to be defined anyway lol

@metatablecat hi, are you still working on this?

I gave up on this a while ago, as I stated above, I cant figure out how the internal seed is generated, and I want feature parity.

@metatablecat I think instead of CPU time try using tick or os.time that seems to be what Roblox is using