VecI16.fromList constructor

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

Implementation

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