Go to the source code of this file.
Functions | |
template<class T> | |
T | ClampBetween (T ToBeClamped, T Min, T Max) |
|
------------------------------------------------------------------------------------------------- Author: Harrison Ainsworth Date: 05/99 Purpose: Clamp a value to an interval. Postconditions: The return is within the interval [Min,Max] ------------------------------------------------------------------------------------------------- Definition at line 123 of file clamp.h. 00124 { 00125 00126 if( ToBeClamped < Min ) 00127 { 00128 ToBeClamped = Min; 00129 } 00130 else 00131 if( ToBeClamped > Max ) 00132 { 00133 ToBeClamped = Max; 00134 } 00135 00136 return ToBeClamped; 00137 00138 }
|