Mod:Creation Kit/RandomFloat - Utility

Member of: Mod:Creation Kit/Utility Script

Generates a random floating point number between the minimum and maximum values (inclusive).

Syntax
float Function RandomFloat(float afMin = 0.0, float afMax = 1.0) native global

Parameters

 * afMin: The minimum value for the random floating point number.
 * Default: 0.0
 * afMax: The maximum value for the random floating point number.
 * Default: 1.0

Return Value
A random floating point number between afMin and afMax (inclusive)

Examples
float random = Utility.RandomFloat float random = Utility.RandomFloat(-1.0, 1.0)
 * Get a random number between 0 and 1
 * Get a random number between -1 and 1