From e6fc8e8af4ff8bd2709eb4485ba1ba9beadd27a5 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Fri, 26 Nov 2021 22:19:07 +0100 Subject: first animation done - added variable length animations - added readme to software subdirectory - implemented first animation --- software/animation.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'software/animation.h') diff --git a/software/animation.h b/software/animation.h index feab14d..3e0d3a7 100644 --- a/software/animation.h +++ b/software/animation.h @@ -4,3 +4,6 @@ /** @brief round time to nearest frame */ unsigned long clamp_time(unsigned long unclamped_time); + +/** @brief 'zigzag' value between 0 and `size - 1`, like modulo (`%`) operator */ +unsigned int zigzag(unsigned int size, int index); -- cgit v1.2.3