toFloat32x4List method

Float32x4List toFloat32x4List()

Implementation

Float32x4List toFloat32x4List() {
  var length = this.length;
  var size = length ~/ 4;
  if (size * 4 < length) ++size;

  var list = List.generate(size, (i) {
    var j = i * 4;
    var x = this[j].toDouble();
    var y = this[++j].toDouble();
    var z = this[++j].toDouble();
    var w = this[++j].toDouble();
    return Float32x4(x, y, z, w);
  });

  return Float32x4List.fromList(list);
}