From 31ce3c5fd0300aac1e86bced1efc5f9ec94bdb6b Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Thu, 13 Mar 2014 22:57:24 -0300 Subject: -fix bug in cache for atlas import/export -fix some menus -fixed bug in out transition curves -detect and remove file:/// in collada -remove multiscript for now -remove dependencies on mouse in OS, moved to Input -avoid fscache from screwing up (fix might make it slower, but it works) -funcref was missing, it's there now --- core/math/math_funcs.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'core/math/math_funcs.cpp') diff --git a/core/math/math_funcs.cpp b/core/math/math_funcs.cpp index 5d3887d72c..92236a374f 100644 --- a/core/math/math_funcs.cpp +++ b/core/math/math_funcs.cpp @@ -220,9 +220,16 @@ int Math::decimals(double p_step) { double Math::ease(double p_x, double p_c) { + if (p_x<0) + p_x=0; + else if (p_x>1.0) + p_x=1.0; if (p_c>0) { - - return Math::pow(p_x,p_c); + if (p_c<1.0) { + return 1.0-Math::pow(1.0-p_x,1.0/p_c); + } else { + return Math::pow(p_x,p_c); + } } else if (p_c<0) { //inout ease -- cgit v1.2.3