diff options
Diffstat (limited to 'AnimationRender/F_Interpolate.c')
| -rw-r--r-- | AnimationRender/F_Interpolate.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/AnimationRender/F_Interpolate.c b/AnimationRender/F_Interpolate.c index 3cb3b5a..4686adf 100644 --- a/AnimationRender/F_Interpolate.c +++ b/AnimationRender/F_Interpolate.c @@ -63,6 +63,15 @@ void Interpolate_Image(Image* value, const Image* start, const Image* end, doubl fprintf(stderr, "Refusing to interpolate between images!"); } +void Interpolate_LineSegment(LineSegment* value, const LineSegment* start, const LineSegment* end, double progress) { + value->aX = NUM_INTERPOLATE(start->aX, end->aX, progress); + value->aY = NUM_INTERPOLATE(start->aY, end->aY, progress); + value->bX = NUM_INTERPOLATE(start->bX, end->bX, progress); + value->bY = NUM_INTERPOLATE(start->bY, end->bY, progress); + value->width = NUM_INTERPOLATE(start->width, end->width, progress); + value->color = colorInterpolate(start->color, end->color, progress); +} + void Interpolate_TransformCenter(TransformCenter* value, const TransformCenter* start, const TransformCenter* end, double progress) { value->centerX = NUM_INTERPOLATE(start->centerX, end->centerX, progress); value->centerY = NUM_INTERPOLATE(start->centerY, end->centerY, progress); |
