.. index:: pair: namespace; EE::Math::easing .. _doxid-namespace_e_e_1_1_math_1_1easing: namespace EE::Math::easing ========================== .. toctree:: :hidden: Overview ~~~~~~~~ .. ref-code-block:: cpp :class: doxyrest-overview-code-block namespace easing { // typedefs typedef double (*:target:`easingCbFunc`)( double, double, double, double ); // global variables :ref:`EE_API` :ref:`easingCbFunc` :target:`easingCb`[]; // global functions double :ref:`noneInterpolation`(double t, double b, double c, double d); double :ref:`EE_API` :target:`cubicBezierInterpolation`(double x1, double y1, double x2, double y2, double t); double :target:`cubicBezierNoParams`(double t, double, double, double); double :ref:`linearInterpolation`(double t, double b, double c, double d); double :ref:`quadraticIn`(double t, double b, double c, double d); double :ref:`quadraticOut`(double t, double b, double c, double d); double :ref:`quadraticInOut`(double t, double b, double c, double d); double :ref:`sineIn`(double t, double b, double c, double d); double :ref:`sineOut`(double t, double b, double c, double d); double :ref:`sineInOut`(double t, double b, double c, double d); double :ref:`exponentialIn`(double t, double b, double c, double d); double :ref:`exponentialOut`(double t, double b, double c, double d); double :ref:`exponentialInOut`(double t, double b, double c, double d); double :target:`quarticIn`(double t, double b, double c, double d); double :target:`quarticOut`(double t, double b, double c, double d); double :target:`quarticInOut`(double t, double b, double c, double d); double :target:`quinticIn`(double t, double b, double c, double d); double :target:`quinticOut`(double t, double b, double c, double d); double :target:`quinticInOut`(double t, double b, double c, double d); double :target:`circularIn`(double t, double b, double c, double d); double :target:`circularOut`(double t, double b, double c, double d); double :target:`circularInOut`(double t, double b, double c, double d); double :target:`cubicIn`(double t, double b, double c, double d); double :target:`cubicOut`(double t, double b, double c, double d); double :target:`cubicInOut`(double t, double b, double c, double d); double :target:`backIn`(double t, double b, double c, double d); double :target:`backOut`(double t, double b, double c, double d); double :target:`backInOut`(double t, double b, double c, double d); double :target:`bounceOut`(double t, double b, double c, double d); double :target:`bounceIn`(double t, double b, double c, double d); double :target:`bounceInOut`(double t, double b, double c, double d); double :target:`elasticIn`(double t, double b, double c, double d); double :target:`elasticOut`(double t, double b, double c, double d); double :target:`elasticInOut`(double t, double b, double c, double d); } // namespace easing .. _details-namespace_e_e_1_1_math_1_1easing: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Global Functions ---------------- .. index:: pair: function; noneInterpolation .. _doxid-namespace_e_e_1_1_math_1_1easing_1aa47e7bcf4390ecec71946ada9775ef97: .. ref-code-block:: cpp :class: doxyrest-title-code-block double noneInterpolation(double t, double b, double c, double d) Keeps the initial value until the current time equals the duration. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - t - Specifies the current time, between 0 and duration inclusive. * - b - Specifies the initial value of the animation property. * - c - Specifies the total change in the animation property. * - d - Specifies the duration of the motion. .. rubric:: Returns: The value of the interpolated property at the specified time. .. index:: pair: function; linearInterpolation .. _doxid-namespace_e_e_1_1_math_1_1easing_1a3ffa44e2c4c44904fecac16105ce2a97: .. ref-code-block:: cpp :class: doxyrest-title-code-block double linearInterpolation(double t, double b, double c, double d) Calculate the position of a point from a linear interpolation. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - t - Specifies the current time, between 0 and duration inclusive. * - b - Specifies the initial value of the animation property. * - c - Specifies the total change in the animation property. * - d - Specifies the duration of the motion. .. rubric:: Returns: The value of the interpolated property at the specified time. .. index:: pair: function; quadraticIn .. _doxid-namespace_e_e_1_1_math_1_1easing_1a819146c84d55938933d34e2305517d07: .. ref-code-block:: cpp :class: doxyrest-title-code-block double quadraticIn(double t, double b, double c, double d) The ``:ref:`quadraticIn() ``` method starts motion from a zero velocity and then accelerates motion as it executes. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - t - Specifies the current time, between 0 and duration inclusive. * - b - Specifies the initial value of the animation property. * - c - Specifies the total change in the animation property. * - d - Specifies the duration of the motion. .. rubric:: Returns: The value of the interpolated property at the specified time. .. index:: pair: function; quadraticOut .. _doxid-namespace_e_e_1_1_math_1_1easing_1a60e874052c053e817c24dec93ce9be15: .. ref-code-block:: cpp :class: doxyrest-title-code-block double quadraticOut(double t, double b, double c, double d) The ``:ref:`quadraticOut() ``` method starts motion fast and then decelerates motion to a zero velocity as it executes. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - t - Specifies the current time, between 0 and duration inclusive. * - b - Specifies the initial value of the animation property. * - c - Specifies the total change in the animation property. * - d - Specifies the duration of the motion. .. rubric:: Returns: The value of the interpolated property at the specified time. .. index:: pair: function; quadraticInOut .. _doxid-namespace_e_e_1_1_math_1_1easing_1a56bf31264903c7c6f04db0b22d41d9ba: .. ref-code-block:: cpp :class: doxyrest-title-code-block double quadraticInOut(double t, double b, double c, double d) The ``:ref:`quadraticInOut() ``` method combines the motion of the ``:ref:`quadraticIn() ``` and ``QuadraticOut()`` methods to start the motion from a zero velocity, accelerate motion, then decelerate to a zero velocity. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - t - Specifies the current time, between 0 and duration inclusive. * - b - Specifies the initial value of the animation property. * - c - Specifies the total change in the animation property. * - d - Specifies the duration of the motion. .. rubric:: Returns: The value of the interpolated property at the specified time. .. index:: pair: function; sineIn .. _doxid-namespace_e_e_1_1_math_1_1easing_1a85d1f7d8338abb8f253ee585be8feffd: .. ref-code-block:: cpp :class: doxyrest-title-code-block double sineIn(double t, double b, double c, double d) The ``:ref:`sineIn() ``` method starts motion from zero velocity and then accelerates motion as it executes. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - t - Specifies the current time, between 0 and duration inclusive. * - b - Specifies the initial value of the animation property. * - c - Specifies the total change in the animation property. * - d - Specifies the duration of the motion. .. rubric:: Returns: The value of the interpolated property at the specified time. .. index:: pair: function; sineOut .. _doxid-namespace_e_e_1_1_math_1_1easing_1ac0ec40d356580e6dc1e0193b1b0a0953: .. ref-code-block:: cpp :class: doxyrest-title-code-block double sineOut(double t, double b, double c, double d) The ``easeOut()`` method starts motion fast and then decelerates motion to a zero velocity as it executes. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - t - Specifies the current time, between 0 and duration inclusive. * - b - Specifies the initial value of the animation property. * - c - Specifies the total change in the animation property. * - d - Specifies the duration of the motion. .. rubric:: Returns: The value of the interpolated property at the specified time. .. index:: pair: function; sineInOut .. _doxid-namespace_e_e_1_1_math_1_1easing_1ac10b4e0c92cb27eb95d8458862682cb2: .. ref-code-block:: cpp :class: doxyrest-title-code-block double sineInOut(double t, double b, double c, double d) The ``easeInOut()`` method combines the motion of the ``easeIn()`` and ``easeOut()`` methods to start the motion from a zero velocity, accelerate motion, then decelerate to a zero velocity. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - t - Specifies the current time, between 0 and duration inclusive. * - b - Specifies the initial value of the animation property. * - c - Specifies the total change in the animation property. * - d - Specifies the duration of the motion. .. rubric:: Returns: The value of the interpolated property at the specified time. .. index:: pair: function; exponentialIn .. _doxid-namespace_e_e_1_1_math_1_1easing_1a172469a9337cf1133e727d6bd8b39acd: .. ref-code-block:: cpp :class: doxyrest-title-code-block double exponentialIn(double t, double b, double c, double d) The ``:ref:`exponentialIn() ``` method starts motion slowly and then accelerates motion as it executes. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - t - Specifies the current time, between 0 and duration inclusive. * - b - Specifies the initial position of a component. * - c - Specifies the total change in position of the component. * - d - Specifies the duration of the effect, in milliseconds. .. rubric:: Returns: Number corresponding to the position of the component. .. index:: pair: function; exponentialOut .. _doxid-namespace_e_e_1_1_math_1_1easing_1a209ba836207b7632b72d01eec71bbcc4: .. ref-code-block:: cpp :class: doxyrest-title-code-block double exponentialOut(double t, double b, double c, double d) The ``:ref:`exponentialOut() ``` method starts motion fast and then decelerates motion to a zero velocity as it executes. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - t - Specifies the current time, between 0 and duration inclusive. * - b - Specifies the initial value of the animation property. * - c - Specifies the total change in the animation property. * - d - Specifies the duration of the motion. .. rubric:: Returns: The value of the interpolated property at the specified time. .. index:: pair: function; exponentialInOut .. _doxid-namespace_e_e_1_1_math_1_1easing_1aa22f9c174ace672a05e7a4ff65d61615: .. ref-code-block:: cpp :class: doxyrest-title-code-block double exponentialInOut(double t, double b, double c, double d) The ``:ref:`exponentialInOut() ``` method combines the motion of the ``:ref:`exponentialIn() ``` and ``ExponentialOut()`` methods to start the motion from a zero velocity, accelerate motion, then decelerate to a zero velocity. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - t - Specifies the current time, between 0 and duration inclusive. * - b - Specifies the initial value of the animation property. * - c - Specifies the total change in the animation property. * - d - Specifies the duration of the motion. .. rubric:: Returns: The value of the interpolated property at the specified time.