diff options
author | Freya Murphy <freya@freyacat.org> | 2025-04-03 12:30:34 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2025-04-03 12:30:34 -0400 |
commit | ec3c37d1d40d7b288584c234f4c3e7a600f2353d (patch) | |
tree | bb587b33c4c793ff7a3317dfa958d69b0fa318a1 /lib/bound.c | |
parent | move boot only headers to boot (diff) | |
download | comus-ec3c37d1d40d7b288584c234f4c3e7a600f2353d.tar.gz comus-ec3c37d1d40d7b288584c234f4c3e7a600f2353d.tar.bz2 comus-ec3c37d1d40d7b288584c234f4c3e7a600f2353d.zip |
new libs
Diffstat (limited to 'lib/bound.c')
-rw-r--r-- | lib/bound.c | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/lib/bound.c b/lib/bound.c index b1b67da..072a41a 100644 --- a/lib/bound.c +++ b/lib/bound.c @@ -1,30 +1,6 @@ -/** -** @file bound.c -** -** @author Numerous CSCI-452 classes -** -** @brief C implementations of common library functions -*/ +#include <stdlib.h> -#ifndef BOUND_SRC_INC -#define BOUND_SRC_INC - -#include <common.h> - -#include <lib.h> - -/** -** bound(min,value,max) -** -** This function confines an argument within specified bounds. -** -** @param min Lower bound -** @param value Value to be constrained -** @param max Upper bound -** -** @return The constrained value -*/ -uint32_t bound(uint32_t min, uint32_t value, uint32_t max) +unsigned int bound(unsigned int min, unsigned int value, unsigned int max) { if (value < min) { value = min; @@ -34,5 +10,3 @@ uint32_t bound(uint32_t min, uint32_t value, uint32_t max) } return value; } - -#endif |