values property
Returns the values as a List<N>.
Implementation
@override
List<double> get values {
if (isEmpty) return <double>[];
final lastEntryIndex = entriesLength - 1;
var entryIndex = 0;
var entry = _entries.first;
var entryCursor = -1;
var valueCursor = -1;
var list = List.generate(length, (i) {
assert(++valueCursor == i);
switch (++entryCursor) {
case 0:
{
return entry.x;
}
case 1:
{
return entry.y;
}
case 2:
{
return entry.z;
}
case 3:
{
var w = entry.w;
if (entryIndex < lastEntryIndex) {
entry = _entries[++entryIndex];
entryCursor = -1;
}
return w;
}
default:
throw StateError('Invalid entryCursor: $entryCursor');
}
});
return list;
}