randomOrNull

inline fun ComplexFloatArray.randomOrNull(): ComplexFloat?
inline fun ComplexDoubleArray.randomOrNull(): ComplexDouble?

Returns a random element from this array, or null if this array is empty.


fun ComplexFloatArray.randomOrNull(random: Random): ComplexFloat?
fun ComplexDoubleArray.randomOrNull(random: Random): ComplexDouble?

Returns a random element from this array using the specified source of randomness, or null if this array is empty.