From 26107501a9c975a7b39b22402316f3e8cd8d0d8e Mon Sep 17 00:00:00 2001 From: "@syxhe" Date: Thu, 1 Aug 2024 23:00:54 -0500 Subject: Move things out of main --- src/screen.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/screen.h') diff --git a/src/screen.h b/src/screen.h index c3deb00..5afbe6e 100644 --- a/src/screen.h +++ b/src/screen.h @@ -103,7 +103,10 @@ struct funcholder { }; // Converts value from within the range of [oldmin, oldmax] to a value within the range [newmin, newmax] -static float normalize(float value, float oldmin, float oldmax, float newmin, float newmax); +float normalize(float value, float oldmin, float oldmax, float newmin, float newmax); + +// Find the result of x + offset and constrain it to the range [min, max]. x must be >= min +int rangemod(int x, int offset, int min, int max); // Initialize a new curses color using standard rgb values (0-255) instead of curses' 0-1000 range static int init_rgb_color(int colornum, int red, int green, int blue); -- cgit v1.2.3