FreeCameraOrientation constructor

const FreeCameraOrientation({
  1. required double x,
  2. required double y,
  3. required double z,
  4. required double w,
})

Creates a quaternion from its components.

The quaternion must have a length of 1.

Implementation

const FreeCameraOrientation({
  required this.x,
  required this.y,
  required this.z,
  required this.w,
}) : assert(
       x * x + y * y + z * z + w * w > 1 - _unitTolerance &&
           x * x + y * y + z * z + w * w < 1 + _unitTolerance,
       'A quaternion for a rotation must have a length of 1.',
     );