HH\Lib\SecureRandom\float

Requires the Hack Standard Library to be installed.

Returns a cryptographically secure random float in the range [0.0, 1.0) (i.e. the return value is >= 0.0 and < 1.0)

namespace HH\Lib\SecureRandom;

function float(): float;

For pseudorandom floats, see PseudoRandom\float.

Returns

  • float