     return (a * pow(2, 10 * t) * sin((t * d - s) * (2 * M_PI) / p)) + b;
 }
 
-func DKKeyframeAnimationFunctionEaseInOutElastic(var t: Double, b: Double, c: Double, d: Double) -> Double {
+func DKKeyframeAnimationFunctionEaseInOutElastic(t: Double, b: Double, c: Double, d: Double) -> Double {
     var s = 1.70158
     var p = 0.0
     var a = c;
     if t == 0 {
         return b
     }
-    t /= d
+    var t = t / d
     if t == 2 {
         return b + c
     }

    }
}

func DKKeyframeAnimationFunctionEaseInQuart(var t: Double, b: Double, c: Double, d: Double) -> Double {
    t /= d
    return c * t * t * t * t + b;
}

func DKKeyframeAnimationFunctionEaseOutQuart(var t: Double, b: Double, c: Double, d: Double) -> Double {
    t = t / d - 1
    return -c * (t * t * t * t - 1) + b;
}

func DKKeyframeAnimationFunctionEaseInOutQuart(var t: Double, b: Double, c: Double, d: Double) -> Double {
    t /= d / 2
    if t < 1 {
        return c / 2 * t * t * t * t + b;
    } else {

    return -(a * pow(2, 10 * t) * sin((t * d - s) * (2 * M_PI) / p )) + b;
}

func DKKeyframeAnimationFunctionEaseOutElastic(t: Double, b: Double, c: Double, d: Double) -> Double {
    var s = 1.70158
    var p = 0.0
    var a = c
    if t == 0 {
        return b
    }
    var t = t / d
    if t == 1 {
        return b + c
    }
