sortedWith

fun ComplexFloatArray.sortedWith(comparator: Comparator<in ComplexFloat>): List<ComplexFloat>
fun ComplexDoubleArray.sortedWith(comparator: Comparator<in ComplexDouble>): List<ComplexDouble>

Returns a list of all elements sorted according to the specified comparator.