Sign in Join
FPDoc Onlineexperiment

RandomFrom function

In unit Math

Return a random element of an array of numbers.

Declaration

pascal
function RandomFrom(const AValues: Array of Double): Double; 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

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.