docs: @SuppressWarnings("synthetic-access")
  	@Pure
  	public EulerAngles getEulerAngles(CoordinateSystem3D system) {
  		// See http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToEuler/index.htm
  		// Standard used: XZY_RIGHT_HAND
  		Quaternion q = new Quaternion(this);
  		system.toSystem(q, CoordinateSystem3D.XZY_RIGHT_HAND);
  
  		double sqw = q.w * q.w;
  		double sqx = q.x * q.x;
  		double sqy = q.y * q.y;
  		double sqz = q.z * q.z;
  		double unit = sqx + sqy + sqz + sqw; // if normalised is one, otherwise is correction factor
  		double test = q.x * q.y + q.z * q.w;
  
  		if (MathUtil.compareEpsilon(test, .5 * unit) >= 0) { // singularity at north pole
  			return new EulerAngles(
  					2. * Math.atan2(q.x, q.w), // heading
  					MathConstants.DEMI_PI, // attitude
  					0.,
  					system);
  		}
  		if (MathUtil.compareEpsilon(test, -.5 * unit) <= 0) { // singularity at south pole
  			return new EulerAngles(
  					-2. * Math.atan2(q.x, q.w), // heading
  					-MathConstants.DEMI_PI, // attitude
  					0.,
  					system);
  		}
  		return new EulerAngles(
  				Math.atan2(2. * q.y * q.w - 2. * q.x * q.z, sqx - sqy - sqz + sqw),
  				Math.asin(2. * test / unit),
  				Math.atan2(2. * q.x * q.w - 2. * q.y * q.z, -sqx + sqy - sqz + sqw),
  				system);
  	}