[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'Math' (#rtl)

RandomFrom

Return a random element of an array of numbers

Declaration

Source position: math.pp line 646

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: May 14 2021