From 673b66547174d8771e34265b436c09e64728a5b8 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 25 Mar 2014 08:00:51 +1100 Subject: [PATCH] Code cleanup: rename BLI_math_easing to BLI_easing Many hard coded values and really specific to time & keyframes. --- source/blender/blenkernel/intern/fcurve.c | 2 +- .../blenlib/{BLI_math_easing.h => BLI_easing.h} | 8 ++++---- source/blender/blenlib/CMakeLists.txt | 4 ++-- .../blender/blenlib/intern/{math_easing.c => easing.c} | 10 ++++++---- 4 files changed, 13 insertions(+), 11 deletions(-) rename source/blender/blenlib/{BLI_math_easing.h => BLI_easing.h} (97%) rename source/blender/blenlib/intern/{math_easing.c => easing.c} (98%) diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index e496513131f..dc5a6aac503 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -45,7 +45,7 @@ #include "BLI_blenlib.h" #include "BLI_math.h" -#include "BLI_math_easing.h" +#include "BLI_easing.h" #include "BLI_utildefines.h" #include "BLF_translation.h" diff --git a/source/blender/blenlib/BLI_math_easing.h b/source/blender/blenlib/BLI_easing.h similarity index 97% rename from source/blender/blenlib/BLI_math_easing.h rename to source/blender/blenlib/BLI_easing.h index c6518491bb3..4b3bc8624d0 100644 --- a/source/blender/blenlib/BLI_math_easing.h +++ b/source/blender/blenlib/BLI_easing.h @@ -28,10 +28,10 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef __BLI_MATH_EASING_H__ -#define __BLI_MATH_EASING_H__ +#ifndef __BLI_EASING_H__ +#define __BLI_EASING_H__ -/** \file BLI_math_easing.h +/** \file BLI_easing.h * \ingroup bli */ @@ -75,4 +75,4 @@ float SineEaseInOut(float time, float begin, float change, float duration); } #endif -#endif // __BLI_MATH_EASING_H__ +#endif /* __BLI_EASING_H__ */ diff --git a/source/blender/blenlib/CMakeLists.txt b/source/blender/blenlib/CMakeLists.txt index 24973cece91..491f988642b 100644 --- a/source/blender/blenlib/CMakeLists.txt +++ b/source/blender/blenlib/CMakeLists.txt @@ -57,6 +57,7 @@ set(SRC intern/convexhull2d.c intern/cpu.c intern/dynlib.c + intern/easing.c intern/edgehash.c intern/endian_switch.c intern/fileops.c @@ -72,7 +73,6 @@ set(SRC intern/math_color.c intern/math_color_blend_inline.c intern/math_color_inline.c - intern/math_easing.c intern/math_geom.c intern/math_geom_inline.c intern/math_interp.c @@ -121,6 +121,7 @@ set(SRC BLI_dlrbTree.h BLI_dynlib.h BLI_dynstr.h + BLI_easing.h BLI_edgehash.h BLI_endian_switch.h BLI_endian_switch_inline.h @@ -142,7 +143,6 @@ set(SRC BLI_math_base.h BLI_math_color.h BLI_math_color_blend.h - BLI_math_easing.h BLI_math_geom.h BLI_math_inline.h BLI_math_interp.h diff --git a/source/blender/blenlib/intern/math_easing.c b/source/blender/blenlib/intern/easing.c similarity index 98% rename from source/blender/blenlib/intern/math_easing.c rename to source/blender/blenlib/intern/easing.c index bb026deb191..f3b2efd4680 100644 --- a/source/blender/blenlib/intern/math_easing.c +++ b/source/blender/blenlib/intern/easing.c @@ -28,15 +28,17 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/** \file blender/blenlib/intern/math_easing.c +/** \file blender/blenlib/intern/easing.c * \ingroup bli */ #include -#include -#include "BLI_math.h" -#include "BLI_math_easing.h" +#include "BLI_math_base.h" + +#include "BLI_easing.h" /* own include */ + +#include "BLI_strict_flags.h" float BackEaseIn(float time, float begin, float change, float duration, float overshoot)