copyWith method

Quaternion copyWith({
  1. double? x,
  2. double? y,
  3. double? z,
  4. double? w,
})

A copy of this value with the given members replaced.

Implementation

Quaternion copyWith({double? x, double? y, double? z, double? w}) =>
    Quaternion(
      x: x ?? this.x,
      y: y ?? this.y,
      z: z ?? this.z,
      w: w ?? this.w,
    );