VecU16.fromList constructor

VecU16.fromList(
  1. List<int> pts
)

Implementation

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