This function constrains a value between a lower and upper limit.
Parameter | Description |
---|---|
value | value to constrain |
minimum | lower limit of the return value |
maximum | upper limit of the return value |
The closest value to the input value that is between the specified minimum and maximum will be returned.
#include "UltraEngine.h"
using namespace UltraEngine;
int main(int argc, const char* argv[])
{
Print(Clamp(307, 0, 255));
return 0;
}