VecF32.fromList constructor

VecF32.fromList(
  1. List<double> pts
)

Implementation

factory VecF32.fromList(List<double> pts) {
  final length = pts.length;
  final pdata = calloc<F32>(length);
  pdata.asTypedList(length).setRange(0, length, pts);
  final p = calloc<cvg.VecF32>()
    ..ref.length = length
    ..ref.ptr = pdata;
  return VecF32.fromPointer(p);
}