|
RSeries astromech firmware
|
|
Go to the documentation of this file.
67 return -(p * (p - 2));
81 return (-2 * p * p) + (4 * p) - 1;
105 return 4 * p * p * p;
109 float f = ((2 * p) - 2);
110 return 0.5 * f * f * f + 1;
117 return p * p * p * p;
124 return f * f * f * (1 - p) + 1;
134 return 8 * p * p * p * p;
139 return -8 * f * f * f * f + 1;
146 return p * p * p * p * p;
153 return f * f * f * f * f + 1;
163 return 16 * p * p * p * p * p;
167 float f = ((2 * p) - 2);
168 return 0.5 * f * f * f * f * f + 1;
175 return sin((p - 1) * M_PI_2) + 1;
181 return sin(p * M_PI_2);
187 return 0.5 * (1 - cos(p * M_PI));
193 return 1 - sqrt(1 - (p * p));
199 return sqrt((2 - p) * p);
209 return 0.5 * (1 - sqrt(1 - 4 * (p * p)));
213 return 0.5 * (sqrt(-((2 * p) - 3) * ((2 * p) - 1)) + 1);
220 return (p == 0.0) ? p : pow(2, 10 * (p - 1));
226 return (p == 1.0) ? p : 1 - pow(2, -10 * p);
234 if (p == 0.0 || p == 1.0)
240 return 0.5 * pow(2, (20 * p) - 10);
242 return -0.5 * pow(2, (-20 * p) + 10) + 1;
248 return sin(13 * M_PI_2 * p) * pow(2, 10 * (p - 1));
254 return sin(-13 * M_PI_2 * (p + 1)) * pow(2, -10 * p) + 1;
264 return 0.5 * sin(13 * M_PI_2 * (2 * p)) * pow(2, 10 * ((2 * p) - 1));
268 return 0.5 * (sin(-13 * M_PI_2 * ((2 * p - 1) + 1)) * pow(2, -10 * (2 * p - 1)) + 2);
275 return p * p * p - p * sin(p * M_PI);
282 return 1 - (f * f * f - f * sin(f * M_PI));
293 return 0.5 * (f * f * f - f * sin(f * M_PI));
297 float f = (1 - (2*p - 1));
298 return 0.5 * (1 - (f * f * f - f * sin(f * M_PI))) + 0.5;
311 return (121 * p * p)/16.0;
315 return (363/40.0 * p * p) - (99/10.0 * p) + 17/5.0;
319 return (4356/361.0 * p * p) - (35442/1805.0 * p) + 16061/1805.0;
321 return (54/5.0 * p * p) - (513/25.0 * p) + 268/25.0;
@ kCircularEaseOut
Definition: ServoEasing.h:31
static float BackEaseIn(float p)
Definition: ServoEasing.h:273
static float CircularEaseInOut(float p)
Definition: ServoEasing.h:205
@ kElasticEaseOut
Definition: ServoEasing.h:37
@ kExponentialEaseOut
Definition: ServoEasing.h:34
@ kCubicEaseInOut
Definition: ServoEasing.h:20
static float CubicEaseOut(float p)
Definition: ServoEasing.h:92
@ kBounceEaseInOut
Definition: ServoEasing.h:44
@ kQuadraticEaseInOut
Definition: ServoEasing.h:17
@ kCubicEaseIn
Definition: ServoEasing.h:18
@ kBackEaseOut
Definition: ServoEasing.h:40
@ kElasticEaseIn
Definition: ServoEasing.h:36
@ kBackEaseInOut
Definition: ServoEasing.h:41
static float ExponentialEaseOut(float p)
Definition: ServoEasing.h:224
static float SineEaseIn(float p)
Definition: ServoEasing.h:173
@ kQuarticEaseInOut
Definition: ServoEasing.h:23
static float QuadraticEaseOut(float p)
Definition: ServoEasing.h:65
float(* Method)(float)
Definition: ServoEasing.h:9
static float CircularEaseOut(float p)
Definition: ServoEasing.h:197
@ kSineEaseInOut
Definition: ServoEasing.h:29
static float QuarticEaseOut(float p)
Definition: ServoEasing.h:121
@ kQuinticEaseInOut
Definition: ServoEasing.h:26
static float QuarticEaseIn(float p)
Definition: ServoEasing.h:115
static float ElasticEaseIn(float p)
Definition: ServoEasing.h:246
static float BackEaseInOut(float p)
Definition: ServoEasing.h:288
@ kExponentialEaseInOut
Definition: ServoEasing.h:35
static float QuadraticEaseInOut(float p)
Definition: ServoEasing.h:73
@ kQuinticEaseIn
Definition: ServoEasing.h:24
static float CubicEaseInOut(float p)
Definition: ServoEasing.h:101
@ kBackEaseIn
Definition: ServoEasing.h:39
static float QuinticEaseInOut(float p)
Definition: ServoEasing.h:159
@ kQuadraticEaseIn
Definition: ServoEasing.h:15
static float QuarticEaseInOut(float p)
Definition: ServoEasing.h:130
static float CircularEaseIn(float p)
Definition: ServoEasing.h:191
static float ElasticEaseOut(float p)
Definition: ServoEasing.h:252
static float SineEaseOut(float p)
Definition: ServoEasing.h:179
static float BounceEaseOut(float p)
Definition: ServoEasing.h:307
@ kQuarticEaseOut
Definition: ServoEasing.h:22
@ kElasticEaseInOut
Definition: ServoEasing.h:38
static float QuinticEaseIn(float p)
Definition: ServoEasing.h:144
@ kQuadraticEaseOut
Definition: ServoEasing.h:16
@ kCubicEaseOut
Definition: ServoEasing.h:19
static float SineEaseInOut(float p)
Definition: ServoEasing.h:185
static float ExponentialEaseInOut(float p)
Definition: ServoEasing.h:232
static float BackEaseOut(float p)
Definition: ServoEasing.h:279
@ kQuinticEaseOut
Definition: ServoEasing.h:25
@ kSineEaseIn
Definition: ServoEasing.h:27
static float QuadraticEaseIn(float p)
Definition: ServoEasing.h:59
@ kQuarticEaseIn
Definition: ServoEasing.h:21
static float BounceEaseIn(float p)
Definition: ServoEasing.h:302
@ kCircularEaseInOut
Definition: ServoEasing.h:32
@ kCircularEaseIn
Definition: ServoEasing.h:30
static float Continuous(float p)
Definition: ServoEasing.h:53
@ kBounceEaseOut
Definition: ServoEasing.h:43
static float ExponentialEaseIn(float p)
Definition: ServoEasing.h:218
static Method getEasingMethod(uint8_t i)
Definition: ServoEasing.h:336
@ kSineEaseOut
Definition: ServoEasing.h:28
@ kBounceEaseIn
Definition: ServoEasing.h:42
static float ElasticEaseInOut(float p)
Definition: ServoEasing.h:260
@ kExponentialEaseIn
Definition: ServoEasing.h:33
@ kContinuous
Definition: ServoEasing.h:14
static float QuinticEaseOut(float p)
Definition: ServoEasing.h:150
static float LinearInterpolation(float p)
Definition: ServoEasing.h:48
static float CubicEaseIn(float p)
Definition: ServoEasing.h:86
Definition: ServoEasing.h:6
static float BounceEaseInOut(float p)
Definition: ServoEasing.h:324
@ kLinearInterpolation
Definition: ServoEasing.h:13