Clamp a value to a specified integer range [min, max], without scaling.
The value to clamp
An integer in [min, max]
Clamp a rectangle to within a given boundary.
The position is assumed to be relative to the boundary.
The position of the rect, as an [x, y] pair
The size of the rect, as a [width, height] pair
The canvas boundary, as a [width, height] pair
The dimensions of the clamped rect, as a 4-tuple of [x, y, width, height].
Generated using TypeDoc