diff options
author | rodri <rgl@antares-labs.eu> | 2020-06-16 15:15:10 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2020-06-16 15:15:10 +0000 |
commit | 4f5035ffa4e67beba5489cf8a23f02c872595ed2 (patch) | |
tree | 1a0bc3e334f6aaec48076b969af1d7e1dacb48ee /utils.c | |
parent | 86a9f3172f6a6ca13348520706ca5a14f4cfb822 (diff) | |
download | puppeteer-4f5035ffa4e67beba5489cf8a23f02c872595ed2.tar.gz puppeteer-4f5035ffa4e67beba5489cf8a23f02c872595ed2.tar.bz2 puppeteer-4f5035ffa4e67beba5489cf8a23f02c872595ed2.zip |
started work on zooming and a textual hud.
Diffstat (limited to 'utils.c')
-rw-r--r-- | utils.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -2,6 +2,12 @@ #include <libc.h> #include <draw.h> +int +clamp(int n, int min, int max) +{ + return n < min? min: n > max? max: n; +} + double fclamp(double n, double min, double max) { |