namespace EE::Math::easing¶
Overview¶
namespace easing { // typedefs typedef double (*easingCbFunc)( double, double, double, double ); // global variables EE_API easingCbFunc easingCb[]; // global functions double noneInterpolation(double t, double b, double c, double d); double EE_API cubicBezierInterpolation(double x1, double y1, double x2, double y2, double t); double cubicBezierNoParams(double t, double, double, double); double linearInterpolation(double t, double b, double c, double d); double quadraticIn(double t, double b, double c, double d); double quadraticOut(double t, double b, double c, double d); double quadraticInOut(double t, double b, double c, double d); double sineIn(double t, double b, double c, double d); double sineOut(double t, double b, double c, double d); double sineInOut(double t, double b, double c, double d); double exponentialIn(double t, double b, double c, double d); double exponentialOut(double t, double b, double c, double d); double exponentialInOut(double t, double b, double c, double d); double quarticIn(double t, double b, double c, double d); double quarticOut(double t, double b, double c, double d); double quarticInOut(double t, double b, double c, double d); double quinticIn(double t, double b, double c, double d); double quinticOut(double t, double b, double c, double d); double quinticInOut(double t, double b, double c, double d); double circularIn(double t, double b, double c, double d); double circularOut(double t, double b, double c, double d); double circularInOut(double t, double b, double c, double d); double cubicIn(double t, double b, double c, double d); double cubicOut(double t, double b, double c, double d); double cubicInOut(double t, double b, double c, double d); double backIn(double t, double b, double c, double d); double backOut(double t, double b, double c, double d); double backInOut(double t, double b, double c, double d); double bounceOut(double t, double b, double c, double d); double bounceIn(double t, double b, double c, double d); double bounceInOut(double t, double b, double c, double d); double elasticIn(double t, double b, double c, double d); double elasticOut(double t, double b, double c, double d); double elasticInOut(double t, double b, double c, double d); } // namespace easing
Detailed Documentation¶
Global Functions¶
double noneInterpolation(double t, double b, double c, double d)
Keeps the initial value until the current time equals the duration.
Parameters:
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. |
Returns:
The value of the interpolated property at the specified time.
double linearInterpolation(double t, double b, double c, double d)
Calculate the position of a point from a linear interpolation.
Parameters:
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. |
Returns:
The value of the interpolated property at the specified time.
double quadraticIn(double t, double b, double c, double d)
The quadraticIn()
method starts motion from a zero velocity and then accelerates motion as it executes.
Parameters:
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. |
Returns:
The value of the interpolated property at the specified time.
double quadraticOut(double t, double b, double c, double d)
The quadraticOut()
method starts motion fast and then decelerates motion to a zero velocity as it executes.
Parameters:
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. |
Returns:
The value of the interpolated property at the specified time.
double quadraticInOut(double t, double b, double c, double d)
The quadraticInOut()
method combines the motion of the quadraticIn()
and QuadraticOut()
methods to start the motion from a zero velocity, accelerate motion, then decelerate to a zero velocity.
Parameters:
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. |
Returns:
The value of the interpolated property at the specified time.
double sineIn(double t, double b, double c, double d)
The sineIn()
method starts motion from zero velocity and then accelerates motion as it executes.
Parameters:
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. |
Returns:
The value of the interpolated property at the specified time.
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.
Parameters:
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. |
Returns:
The value of the interpolated property at the specified time.
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.
Parameters:
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. |
Returns:
The value of the interpolated property at the specified time.
double exponentialIn(double t, double b, double c, double d)
The exponentialIn()
method starts motion slowly and then accelerates motion as it executes.
Parameters:
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. |
Returns:
Number corresponding to the position of the component.
double exponentialOut(double t, double b, double c, double d)
The exponentialOut()
method starts motion fast and then decelerates motion to a zero velocity as it executes.
Parameters:
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. |
Returns:
The value of the interpolated property at the specified time.
double exponentialInOut(double t, double b, double c, double d)
The exponentialInOut()
method combines the motion of the exponentialIn()
and ExponentialOut()
methods to start the motion from a zero velocity, accelerate motion, then decelerate to a zero velocity.
Parameters:
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. |
Returns:
The value of the interpolated property at the specified time.