                     attribute.center.x
                 let degress = -90 * self.rotationRatio * (distance / (self.collectionView?.bounds.width ?? 1))
 
-                let cosValue = CGFloat(fabs(cosf(Float(AngleWithDegrees(degress)))))
+                
+                let cosValue = abs(cos(AngleWithDegrees(degress)))                
                 let translateY = self.rotationRadius - self.rotationRadius * cosValue
                 var transform = CGAffineTransform(translationX: 0, y: translateY)
                 transform = transform.rotated(by: AngleWithDegrees(degress))

            return true
        }

        return !(collectionView?.bounds.size.equalTo(newBounds.size) ?? false)
    }

    override func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? {

     *  rotationRadius表示旋转的半径
     *  @warning 仅当 style 为 QMUICollectionViewPagingLayoutStyleRotation 时才生效
     */
    private var _rotationRatio: CGFloat = 0
    public var rotationRatio: CGFloat {
        get {
            return validated(rotationRatio: _rotationRatio)
        }
        set {
            _rotationRatio = newValue
        }
    }

