From ec3c37d1d40d7b288584c234f4c3e7a600f2353d Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Thu, 3 Apr 2025 12:30:34 -0400 Subject: new libs --- lib/bound.c | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) (limited to 'lib/bound.c') 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 -#ifndef BOUND_SRC_INC -#define BOUND_SRC_INC - -#include - -#include - -/** -** 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 -- cgit v1.2.3-freya