getSeed.lua 592 B

123456789101112131415161718192021222324
  1. return {
  2. summary = 'Get the seed value of the RandomGenerator.',
  3. description = 'Returns the seed used to initialize the RandomGenerator.',
  4. arguments = {},
  5. returns = {
  6. {
  7. name = 'low',
  8. type = 'number',
  9. description = 'The lower 32 bits of the seed.'
  10. },
  11. {
  12. name = 'high',
  13. type = 'number',
  14. description = 'The upper 32 bits of the seed.'
  15. }
  16. },
  17. notes = [[
  18. Since the seed is a 64 bit integer, each 32 bits of the seed are returned separately to avoid
  19. precision issues.
  20. ]],
  21. related = {
  22. 'lovr.math.newRandomGenerator'
  23. }
  24. }