copyOf

inline fun ComplexFloatArray.copyOf(): ComplexFloatArray
inline fun ComplexDoubleArray.copyOf(): ComplexDoubleArray

Returns new array which is a copy of the original array.


inline fun ComplexFloatArray.copyOf(newSize: Int): ComplexFloatArray
inline fun ComplexDoubleArray.copyOf(newSize: Int): ComplexDoubleArray

Returns new array which is a copy of the original array, resized to the given newSize. The copy is either truncated or padded at the end with zero values if necessary.

  • If newSize is less than the size of the original array, the copy array is truncated to the newSize.

  • If newSize is greater than the size of the original array, the extra elements in the copy array are filled with zero values.