/// <summary>
 /// Helper method to calculate roll factor, easier to handle than based directly on axis
 /// </summary>
 /// <param name="rotation">rotation quaternion</param>
 /// <param name="deadzoneHandler">deadzone handler to use</param>
 /// <returns>roll factor</returns>
 public static float CalculateRollFactor(Quaternion rotation, DeadzoneHandler deadzoneHandler)
 {
     return(CalculateAdjustedRotationFactor(rotation.z, rotation, deadzoneHandler));
 }
        /// <summary>
        /// factor in inner and outer deadzones, inner to correct for "jitter" and outer to handle out-of-bounds input ranges
        /// </summary>
        /// <param name="factor">input value that is to be adjusted</param>
        /// <param name="rotation">rotation quaternion</param>
        /// <param name="deadzoneHandler"></param>
        /// <returns>adjusted rotationf actor</returns>
        public static float CalculateAdjustedRotationFactor(float factor, Quaternion rotation, DeadzoneHandler deadzoneHandler)
        {
            var rotationVector = new Vector3(rotation.x, rotation.y, rotation.z);

            return(deadzoneHandler.AdjustValue(factor, rotationVector));
        }