Skip to content

Commit

Permalink
Merge pull request cfengine#252 from tzz/feature/3804-clarify-randomi…
Browse files Browse the repository at this point in the history
…nt-upper-bound

functions/randomint: clarify upper bound
  • Loading branch information
zzamboni committed Nov 27, 2013
2 parents 48060a7 + 647559d commit bc95dfe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion reference/functions/randomint.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ tags: [reference, data functions, functions, randomint]

[%CFEngine_function_prototype(lower, upper)%]

**Description:** Returns a random integer between `lower` and `upper`.
**Description:** Returns a random integer between `lower` and *up to but not including* `upper`.

The limits must be integer values and the resulting numbers are based on
the entropy of the md5 algorithm.

The `upper` limit is excluded from the range. Thus `randomint(0, 100)`
will return 100 possible values, not 101.

The function will be re-evaluated on each pass if it is not restricted with a
context class expression as shown in the example.

Expand Down

0 comments on commit bc95dfe

Please sign in to comment.