fromArray method
array
of length 3 or 4. The optional 4th argument corresponds
to the order.
Assigns this euler's x angle to array[0]
.
Assigns this euler's y angle to array[1]
.
Assigns this euler's z angle to array[2]
.
Optionally assigns this euler's order to array[3]
.
Implementation
Euler fromArray(List<double> array) {
_x = array[0];
_y = array[1];
_z = array[2];
if (array.length > 3) _order = RotationOrders.values[array[3].toInt()];
onChangeCallback();
return this;
}