     }
     
 }
-
-
-extension Double {
-    
-    func toHalfCGFloat() -> CGFloat {
-        return CGFloat(halfRound())
-    }
-    
-    func halfRound() -> Double {
-        return round(self*2)/2
-    }
-    
-}
-
-extension CGFloat {
-    
-    func toHalfCGFloat() -> CGFloat {
-        return Double(self).toHalfCGFloat()
-    }
-    
-}
-

                    let height = screenHeight * (1 - progress * animationSizeDiff)
                    let x = (screenWidth - width)/2
                    let y = (screenHeight - height)/2
                    visibleViewController?.view.frame = CGRectMake(x.toHalfCGFloat(), y.toHalfCGFloat(), width.toHalfCGFloat(), height.toHalfCGFloat())
                    visibleViewController?.view.alpha = 1 - progress * animationAlphaDiff
                }
                

        let height = screenHeight * (1 - animationSizeDiff)
        let x = (screenWidth - width)/2
        let y = (screenHeight - height)/2
        afterViewController?.view.frame = CGRectMake(x, y, width, height)
        afterViewController?.view.alpha = 1 - animationAlphaDiff
    }
    
