setSeed.lua 887 B

123456789101112131415161718192021222324252627282930313233343536
  1. return {
  2. summary = 'Reinitialize the RandomGenerator with a new seed.',
  3. description = [[
  4. Seed the RandomGenerator with a new seed. Each seed will cause the RandomGenerator to produce a
  5. unique sequence of random numbers.
  6. ]],
  7. arguments = {
  8. seed = {
  9. type = 'number',
  10. description = 'The random seed.'
  11. },
  12. low = {
  13. type = 'number',
  14. description = 'The lower 32 bits of the seed.'
  15. },
  16. high = {
  17. type = 'number',
  18. description = 'The upper 32 bits of the seed.'
  19. }
  20. },
  21. returns = {},
  22. variants = {
  23. {
  24. arguments = { 'seed' },
  25. returns = {}
  26. },
  27. {
  28. arguments = { 'low', 'high' },
  29. returns = {}
  30. }
  31. },
  32. notes = [[
  33. For precise 64 bit seeds, you should specify the lower and upper 32 bits of the seed separately.
  34. Otherwise, seeds larger than 2^53 will start to lose precision.
  35. ]]
  36. }