arrayToDoubleList function

List<double> arrayToDoubleList(
  1. Pointer<Double> ptr,
  2. int length
)

Convert C double array to Dart double list.

Implementation

List<double> arrayToDoubleList(Pointer<Double> ptr, int length) {
  final list = <double>[];
  for (var i = 0; i < length; i++) {
    list.add(ptr[i].toDouble());
  }
  return list;
}