#### Archived

This topic is now archived and is closed to further replies.

# lighting help

## Recommended Posts

I''ve been reading this tutorial: http://www.flipcode.com/tutorials/tut_swlighting.shtml and I''ve made my way right to the bottom to discover a vector operation called "Clamp" and I have no idea what this means... Could anyone explain it for me please?

##### Share on other sites
Clamping a value means to restrict it to a certain range (usually the range [0,1]). For a single value, it is roughly equal to
if(value < Low) value=Low;if(value > High) value=High;

Clamping a vector means merely clamping each of the individual elements to the range.

Josh
vertexnormal AT linuxmail DOT org

Check out Golem: Lands of Shadow, an isometrically rendered hack-and-slash inspired equally by Nethack and Diablo.

[edited by - VertexNormal on January 15, 2004 9:16:07 PM]

• ### Forum Statistics

• Total Topics
628305
• Total Posts
2981962

• 9
• 12
• 11
• 12
• 11