matrix static method

Matrix4? matrix(
  1. DataSource source,
  2. List<Object> key
)

Returns a list of 16 doubles from the specified list.

If the list is missing or has fewer than 16 entries, returns null.

Otherwise, returns a list of 16 entries, corresponding to the first 16 entries of the specified list, with any non-double values replaced by 0.0.

Implementation

static Matrix4? matrix(DataSource source, List<Object> key) {
  final double? arg15 = source.v<double>([...key, 15]);
  if (arg15 == null) {
    return null;
  }
  return Matrix4(
    source.v<double>([...key, 0]) ?? 0.0,
    source.v<double>([...key, 1]) ?? 0.0,
    source.v<double>([...key, 2]) ?? 0.0,
    source.v<double>([...key, 3]) ?? 0.0,
    source.v<double>([...key, 4]) ?? 0.0,
    source.v<double>([...key, 5]) ?? 0.0,
    source.v<double>([...key, 6]) ?? 0.0,
    source.v<double>([...key, 7]) ?? 0.0,
    source.v<double>([...key, 8]) ?? 0.0,
    source.v<double>([...key, 9]) ?? 0.0,
    source.v<double>([...key, 10]) ?? 0.0,
    source.v<double>([...key, 11]) ?? 0.0,
    source.v<double>([...key, 12]) ?? 0.0,
    source.v<double>([...key, 13]) ?? 0.0,
    source.v<double>([...key, 14]) ?? 0.0,
    arg15,
  );
}