Function clamp
#include <macaw.h>double clamp(double v, double lo, double hi);
Keeps a number between two limits, like a player's position inside the screen.
Parameters
vdouble- The number to keep in range.
lodouble- The lowest it may be.
hidouble- The highest it may be.
Returns double
v, or lo if v is below it, or hi if v is above it.