From 7bca1ce8c15c3a5892aa44624d270f6ae8d35aaa Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 28 Mar 2026 23:49:45 +0200 Subject: feat: Implement line segment and make node moving animation --- AnimationRender/F_Interpolate.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'AnimationRender/F_Interpolate.c') 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); -- cgit v1.2.3