getSeed.lua 652 B

12345678910111213141516171819202122232425262728
  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. low = {
  7. type = 'number',
  8. description = 'The lower 32 bits of the seed.'
  9. },
  10. high = {
  11. type = 'number',
  12. description = 'The upper 32 bits of the seed.'
  13. }
  14. },
  15. variants = {
  16. {
  17. arguments = {},
  18. returns = { 'low', 'high' }
  19. }
  20. },
  21. notes = [[
  22. Since the seed is a 64 bit integer, each 32 bits of the seed are returned separately to avoid
  23. precision issues.
  24. ]],
  25. related = {
  26. 'lovr.math.newRandomGenerator'
  27. }
  28. }