VecF32.generate constructor
Implementation
factory VecF32.generate(int length, double Function(int i) generator) {
final pp = calloc<cvg.VecF32>()..ref.length = length;
pp.ref.ptr = calloc<ffi.Float>(length);
for (var i = 0; i < length; i++) {
final v = generator(i);
pp.ref.ptr[i] = v;
}
return VecF32.fromPointer(pp);
}