Clamp (function)

Unlike wrapping, clamping merely moves the point to the nearest available value.

Several programming languages and libraries provide functions for fast and vectorized clamping.

In the Wolfram Language, it is implemented as Clip[x, {minimum, maximum}].

[4] In OpenGL, the glClearColor function takes four GLfloat values which are then 'clamped' to the range

[5] One of the many uses of clamping in computer graphics is the placing of a detail inside a polygon—for example, a bullet hole on a wall.