rnd_uniform
- Details
- Last Updated on Wednesday, 30 January 2013 13:38
syntax
-
rnd_uniform(seed, DomainUnit, valuesrange)
definition
rnd_uniform(seed, DomainUnit, valuesrange) results in a data item with pseudo random values and with the following arguments:
- a random seed with a unique number; using the same random seed results in the same random values;
- the DomainUnit of the resulting data item;
- the valuesrange determines the range of possible values. Use the range function to configure this range.
applies to
Data item random seed with value type:
conditions
The resulting data item need to match with regard to it's values unit with the values unit of the valuesrange .
since version
5.15
example
attribute<float32> rand (ADomain): expr =
"rnd_uniform("
" 0"
",ADomain"
",range(float32, float32(0), float32(1))"
")";
| rand |
| 0.719643 |
| 0.781171 |
| 0.974884 |
| 0.446728 |
| 0.087888 |