Extensions.Util.GetRandomNumber
Jump to navigation
Jump to search
Contents
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.
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.
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