Extensions.Util.GetRandomNumber
Revision as of 10:57, 4 October 2018 by Hb (talk | contribs) (Created page with "{{DISPLAYTITLE: '''GetRandomNumber'''}}Category:Util == Classification == {{ClassificationActivity | GetRandomNumber | Returns a random float | Term | Extensions.Ut...")
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
Float Float1;
/// Flow
Float1 = Util.GetRandomNumber();
See also
Compare
CopyByteField
IsInitialized
ListIndexOf
ListIndexOfAny
ListReverse
ListSort
Max
Min
StringFormat