List<double> toList(int length) { final list = List<double>.filled(length, 0); for (var i = 0; i < length; i++) { list[i] = this[i]; } return list; }