diff --git a/kaacore b/kaacore index 85acd05e..cc27c848 160000 --- a/kaacore +++ b/kaacore @@ -1 +1 @@ -Subproject commit 85acd05e073e8958d47aa84c28dac8bbfe373203 +Subproject commit cc27c848541ff6f8c16d210ec952e82c3615d163 diff --git a/src/kaa/easings.pxi b/src/kaa/easings.pxi index bf708d52..2d1a1f27 100644 --- a/src/kaa/easings.pxi +++ b/src/kaa/easings.pxi @@ -40,6 +40,14 @@ def ease(object easing, double progress): def ease_between(object easing, double progress, a, b): + if isinstance(a, (int, float)): + assert isinstance(b, (int, float)), \ + "`a` is a number, `b` must have the same type." + return c_ease_between[double]( + (easing.value), + progress, a, b + ) + if isinstance(a, Vector): assert isinstance(b, Vector), \ "`a` is a Vector, `b` must have the same type." @@ -47,5 +55,7 @@ def ease_between(object easing, double progress, a, b): (easing.value), progress, (a).c_vector, - (b).c_vector, + (b).c_vector )) + + raise Exception('Unsupported type of parameters.')