HH\Lib\SecureRandom\float

Requires the Hack Standard Library to be installed.
Facebook Engineer?

This function is available as SecureRandom\float() in Facebook's www repository.

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