Unit 'Math' Package
[Overview][Constants][Types][Classes][Procedures and functions][Index] [#rtl]

RandomFrom

Return a random element of an array of numbers.

Declaration

Source position: math.pp line 841

function RandomFrom(

  const AValues: array of Double

):Double; overload;

function RandomFrom(

  const AValues: array of Integer

):Integer; overload;

function RandomFrom(

  const AValues: array of Int64

):Int64; overload;

Description

RandomFrom returns a random element from the array AValues. The return value has the same type as the type of the array elements.

See also

#rtl.system.Random

  

Generate random number.

RandomRange

  

Return a random number in a range.


Documentation generated on: Jul 24 2023