randomNormal.lua 924 B

1234567891011121314151617181920212223242526272829303132333435
  1. return {
  2. summary = 'Get a random number from a normal distribution.',
  3. description = [[
  4. Returns a pseudo-random number from a normal distribution (a bell curve). You can control the
  5. center of the bell curve (the mean value) and the overall width (sigma, or standard deviation).
  6. ]],
  7. arguments = {
  8. {
  9. name = 'sigma',
  10. type = 'number',
  11. default = '1',
  12. description = [[
  13. The standard deviation of the distribution. This can be thought of how "wide" the range of
  14. numbers is or how much variability there is.
  15. ]]
  16. },
  17. {
  18. name = 'mu',
  19. type = 'number',
  20. default = '0',
  21. description = 'The average value returned.'
  22. }
  23. },
  24. returns = {
  25. {
  26. name = 'x',
  27. type = 'number',
  28. description = 'A normally distributed pseudo-random number.'
  29. }
  30. },
  31. related = {
  32. 'lovr.math.randomNormal',
  33. 'RandomGenerator:random'
  34. }
  35. }