Browse Source

Remove `easings.h` from raylib/src, moved to examples

pull/2622/head
Ray 3 years ago
parent
commit
0ce8a8f360
2 changed files with 18 additions and 18 deletions
  1. +8
    -8
      examples/others/reasings.h
  2. +10
    -10
      examples/shapes/reasings.h

src/easings.h → examples/others/reasings.h View File

@ -1,11 +1,11 @@
/******************************************************************************************* /*******************************************************************************************
* *
* raylib easings p">(header only file)
* reasings - raylib easings n">library, based on Robert Penner library
* *
* Useful easing functions for values animation * Useful easing functions for values animation
* *
* This header uses: * This header uses:
* #define EASINGS_STATIC_INLINE // Inlines all functions code, so it runs faster.
* #define REASINGS_STATIC_INLINE // Inlines all functions code, so it runs faster.
* // This requires lots of memory on system. * // This requires lots of memory on system.
* How to use: * How to use:
* The four inputs t,b,c,d are defined as follows: * The four inputs t,b,c,d are defined as follows:
@ -60,7 +60,7 @@
* OF THE POSSIBILITY OF SUCH DAMAGE. * OF THE POSSIBILITY OF SUCH DAMAGE.
* --------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------
* *
* Copyright (c) 2015 Ramon Santamaria
* Copyright (c) 2015-2022 Ramon Santamaria (@raysan5)
* *
* This software is provided "as-is", without any express or implied warranty. In no event * This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software. * will the authors be held liable for any damages arising from the use of this software.
@ -79,12 +79,12 @@
* *
**********************************************************************************************/ **********************************************************************************************/
#ifndef EASINGS_H
#define EASINGS_H
#ifndef REASINGS_H
#define REASINGS_H
#define EASINGS_STATIC_INLINE // NOTE: By default, compile functions as static inline
#define REASINGS_STATIC_INLINE // NOTE: By default, compile functions as static inline
#if defined(EASINGS_STATIC_INLINE)
#if defined(REASINGS_STATIC_INLINE)
#define EASEDEF static inline #define EASEDEF static inline
#else #else
#define EASEDEF extern #define EASEDEF extern
@ -260,4 +260,4 @@ EASEDEF float EaseElasticInOut(float t, float b, float c, float d) // Ease: Elas
} }
#endif #endif
#endif // EASINGS_H
#endif // REASINGS_H

examples/others/easings.h → examples/shapes/reasings.h View File

@ -1,11 +1,11 @@
/******************************************************************************************* /*******************************************************************************************
* *
* raylib easings p">(header only file)
* reasings - raylib easings n">library, based on Robert Penner library
* *
* Useful easing functions for values animation * Useful easing functions for values animation
* *
* This header uses: * This header uses:
* #define EASINGS_STATIC_INLINE // Inlines all functions code, so it runs faster.
* #define REASINGS_STATIC_INLINE // Inlines all functions code, so it runs faster.
* // This requires lots of memory on system. * // This requires lots of memory on system.
* How to use: * How to use:
* The four inputs t,b,c,d are defined as follows: * The four inputs t,b,c,d are defined as follows:
@ -60,7 +60,7 @@
* OF THE POSSIBILITY OF SUCH DAMAGE. * OF THE POSSIBILITY OF SUCH DAMAGE.
* --------------------------------------------------------------------------------- * ---------------------------------------------------------------------------------
* *
* Copyright (c) 2015 Ramon Santamaria
* Copyright (c) 2015-2022 Ramon Santamaria (@raysan5)
* *
* This software is provided "as-is", without any express or implied warranty. In no event * This software is provided "as-is", without any express or implied warranty. In no event
* will the authors be held liable for any damages arising from the use of this software. * will the authors be held liable for any damages arising from the use of this software.
@ -79,12 +79,12 @@
* *
**********************************************************************************************/ **********************************************************************************************/
#ifndef EASINGS_H
#define EASINGS_H
#ifndef REASINGS_H
#define REASINGS_H
#define EASINGS_STATIC_INLINE // NOTE: By default, compile functions as static inline
#define REASINGS_STATIC_INLINE // NOTE: By default, compile functions as static inline
#if defined(EASINGS_STATIC_INLINE)
#if defined(REASINGS_STATIC_INLINE)
#define EASEDEF static inline #define EASEDEF static inline
#else #else
#define EASEDEF extern #define EASEDEF extern
@ -96,7 +96,7 @@
#define PI 3.14159265358979323846f //Required as PI is not always defined in math.h #define PI 3.14159265358979323846f //Required as PI is not always defined in math.h
#endif #endif
#ifdef __cplusplus
#if defined(__cplusplus)
extern "C" { // Prevents name mangling of functions extern "C" { // Prevents name mangling of functions
#endif #endif
@ -256,8 +256,8 @@ EASEDEF float EaseElasticInOut(float t, float b, float c, float d) // Ease: Elas
return (postFix*sinf((t*d-s)*(2.0f*PI)/p)*0.5f + c + b); return (postFix*sinf((t*d-s)*(2.0f*PI)/p)*0.5f + c + b);
} }
#ifdef __cplusplus
#if defined(__cplusplus)
} }
#endif #endif
#endif // EASINGS_H
#endif // REASINGS_H

Loading…
Cancel
Save