Returns a value clamped to the inclusive range of min and max.
Syntax
import { clamp } from '@opentf/std';
clamp(val: number, min: number, max: number): number;
Examples
clamp(10, -5, 5) //=> 5
clamp(0, 1000, 1366) //=> 1000
clamp(1001, 1000, 1366) //=> 1001
clamp(1500, 1000, 1366) //=> 1366