Extensions.Util.GetRandomNumber

From emotive
Jump to navigation Jump to search

Classification

Name GetRandomNumber
Short Description Returns a random float
Class Term
Extension OTX Util extension
Group Util related terms
Exceptions -
Checker Rules -
Standard Compliant Yes

OTL Syntax

FloatTerm Util.GetRandomNumber();

Description

The OTX GetRandomNumber term is a FloatTerm that returns a random float greater than or equal to 0.0 and less than 1.0. The result shall be uniformly distributed.

Icons Note.png NOTE — the mechanism to get a random value depends on the runtime system. It's not guaranteed that the random value is a true random number.

Return Value

The Term returns the value, see table below.

Icons Note.png In OTX, Terms are categorized according to its return data type!
Data Type Description
Float A random float greater than or equal to 0.0 and less than 1.0

Properties

  • NONE

OTL Examples

/// Local Declarations

Float Float1;

/// Flow

Float1 = Util.GetRandomNumber();

See also

Compare
CopyByteField
IsInitialized
ListIndexOf
ListIndexOfAny
ListReverse
ListSort
Max
Min
StringFormat