toArray method

List<num> toArray([
  1. List<num>? array,
  2. int offset = 0
])

array - (optional) array to store the euler in.

offset (optional) offset in the array.

Returns an array of the form [x, y, z, order].

Implementation

List<num> toArray([List<num>? array, int offset = 0]) {
  array ??= List<num>.filled(offset + 4, 0);
  array[offset] = _x;
  array[offset + 1] = _y;
  array[offset + 2] = _z;
  array[offset + 3] = _order.index;

  return array;
}