<s>
In	O
computer	O
graphics	O
,	O
clamping	B-Algorithm
is	O
the	O
process	O
of	O
limiting	O
a	O
position	O
to	O
an	O
area	O
.	O
</s>
<s>
Unlike	O
wrapping	B-Algorithm
,	O
clamping	B-Algorithm
merely	O
moves	O
the	O
point	O
to	O
the	O
nearest	O
available	O
value	O
.	O
</s>
<s>
To	O
put	O
clamping	B-Algorithm
into	O
perspective	O
,	O
pseudocode	B-Language
(	O
in	O
Python	B-Language
)	O
for	O
clamping	B-Algorithm
is	O
as	O
follows	O
:	O
</s>
<s>
In	O
general	O
,	O
clamping	B-Algorithm
is	O
used	O
to	O
restrict	O
a	O
value	O
to	O
a	O
given	O
range	O
.	O
</s>
<s>
For	O
example	O
,	O
in	O
OpenGL	B-Application
the	O
glClearColor	O
function	O
takes	O
four	O
GLfloat	O
values	O
which	O
are	O
then	O
'	O
clamped	O
 '	O
to	O
the	O
range	O
.	O
</s>
<s>
One	O
of	O
the	O
many	O
uses	O
of	O
clamping	B-Algorithm
in	O
computer	O
graphics	O
is	O
the	O
placing	O
of	O
a	O
detail	O
inside	O
a	O
polygon	O
—	O
for	O
example	O
,	O
a	O
bullet	O
hole	O
on	O
a	O
wall	O
.	O
</s>
<s>
It	O
can	O
also	O
be	O
used	O
with	O
wrapping	B-Algorithm
to	O
create	O
a	O
variety	O
of	O
effects	O
.	O
</s>
