Just a clarification comment
This commit is contained in:
parent
6cee7ca8cd
commit
76721c28d1
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.14 2006/06/08 08:52:02 zifnab1974
|
||||||
|
gcc 4 needs the extra template keyword
|
||||||
|
|
||||||
Revision 1.13 2005/06/24 12:21:48 ponchio
|
Revision 1.13 2005/06/24 12:21:48 ponchio
|
||||||
Fixed "lerp" function.
|
Fixed "lerp" function.
|
||||||
|
|
||||||
|
@ -241,6 +244,7 @@ inline void Color4<T>::ColorRamp(const float &minf,const float &maxf ,float v )
|
||||||
{
|
{
|
||||||
if(minf>maxf) { ColorRamp(maxf,minf,maxf+(minf-v)); return; }
|
if(minf>maxf) { ColorRamp(maxf,minf,maxf+(minf-v)); return; }
|
||||||
if(v < minf ) { *this=Color4<T>(Color4<T>::Red); return; }
|
if(v < minf ) { *this=Color4<T>(Color4<T>::Red); return; }
|
||||||
|
//the case v > maxf is handled automatically at the end of the function
|
||||||
|
|
||||||
float step=(maxf-minf)/4;
|
float step=(maxf-minf)/4;
|
||||||
v-=minf;
|
v-=minf;
|
||||||
|
|
Loading…
Reference in New Issue