mirror of
https://github.com/love2d/love.git
synced 2026-08-13 17:10:54 +02:00
5f586390d8
Contains just a RNG for now, but may include other functionality (e.g.
transforms) later on.
New Functions:
-- as in the lua math library:
love.math.randomseed(number) -- set random seed
love.math.random() -- get random number in [0:1) (uniformly distributed)
love.math.random(high) -- get integer random number in [1:high]
love.math.random(low, high) -- get integer random number in [low:high]
-- additional functions
love.math.randnormal() -- get normally distributed number with zero mean
-- and unit variance
love.math.randnormal(o) -- get normally distributed number with zero mean
-- and standard deviation `o`
love.math.randnormal(m, o) -- get normally distributed number with mean `m`
-- and standard deviation `o`