uniformArray

Generate an array of n randomly generateds T's in the closed interval [a, b]. Emphasis on random, to avoid compiler optimizations corrupting benchmark results.

@safe
T[]
uniformArray
(
T
)
(
ulong n
,
T a
,
T b
)
if (
isNumeric!T
)

Examples

//Pass it to parameterizer by aliasing with your a, b

alias generate(n) = (n) => uniformArray(n, -20, 20);

Meta