summaryrefslogtreecommitdiff
path: root/lib/bound.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bound.c')
-rw-r--r--lib/bound.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/bound.c b/lib/bound.c
index f086473..b1b67da 100644
--- a/lib/bound.c
+++ b/lib/bound.c
@@ -24,11 +24,12 @@
**
** @return The constrained value
*/
-uint32_t bound( uint32_t min, uint32_t value, uint32_t max ) {
- if( value < min ){
+uint32_t bound(uint32_t min, uint32_t value, uint32_t max)
+{
+ if (value < min) {
value = min;
}
- if( value > max ){
+ if (value > max) {
value = max;
}
return value;