Clamping (graphics)

In computer graphics, clamping is the process of limiting a position to an area. Unlike wrapping, clamping merely moves the point to the nearest available value. To put clamping into perspective, pseudocode for clamping is as follows: Pseudocode (clamping): function clamp(x, min, max): if (x < min) then x = min else if (x > max) then x = max return x

Clamping (graphics)

In computer graphics, clamping is the process of limiting a position to an area. Unlike wrapping, clamping merely moves the point to the nearest available value. To put clamping into perspective, pseudocode for clamping is as follows: Pseudocode (clamping): function clamp(x, min, max): if (x < min) then x = min else if (x > max) then x = max return x