W3cubDocs

/LÖVE

RandomGenerator:getSeed

Available since LÖVE 0.9.0
This function is not supported in earlier versions.

Gets the seed of the random number generator object.

The seed is split into two numbers due to Lua's use of doubles for all number values - doubles can't accurately represent integer values above 2^53, but the seed value is an integer number in the range of [0, 2^64 - 1].

Function

Synopsis

low, high = RandomGenerator:getSeed( )

Arguments

None.

Returns

number low
Integer number representing the lower 32 bits of the RandomGenerator's 64 bit seed value.
number high
Integer number representing the higher 32 bits of the RandomGenerator's 64 bit seed value.

See Also

© 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/RandomGenerator:getSeed